from client side
Client Push is a feature that is available on Back4App’s Parse API, however it is not enabled by default due to security issues.
Enabling Client Push and allowing your App to use its features is quite simple, but not encouraged. The main function of Client Push is for debugging and test purposes.
In this tutorial an example app will be built and this is how it will look like:
At any time, you can access the complete Android Project built with this tutorial at our Github repository.
To complete this tutorial, we need:
- An app created on Back4App.
- An android app connected to Back4App.
- Note: Follow the Install Parse SDK tutorial to create an Android Studio Project connected to Back4App.
- Find the “Core Settings” block and click on SETTINGS. The “Core Settings” block looks like this:
3. Scroll to the end of the page and click on the EDIT DETAILS button, as shown below:
4. You will see a checkbox called Allow Push Notification from Client in the end of the edit page, tick that box and click on the SAVE button, as shown below:
- At the beginning of your activity, import the following dependencies:
2. Use ParsePush to send the push message, as shown in the following code:
Remember to set up the channels and the message.
3. To test the push notifications, just call that function while the device is opened.
At this stage, you can send push notifications using your own device with Client Push through Back4App!
To learn more about Android push notification, see Parse Android Push Notification Official Documentation.