Sometimes while you're trying to send pushes, you may come across a problem which could prevent the process from completing.
Firstly, we recommend you follow the Back4App Official Documentation which contains the steps to configure the Push Notification to Android (click here). If you are still not able to receive the push, in this article, we will include some tips that should help you to solve with these tips. Check the topics below:
1. Link your Firebase Project with Back4App
1. 1. Go to Back4App Push Notification Doc and follow the Step 1 to create a Firebase Project.
1. 2. Then, go to Back4App Website, log in, find your app and click on Server Settings. Find the “Android Push notification” block and click on SETTINGS > EDIT. Copy the Server Key and paste it at the API Key field shown in the Back4App Android Push Notification page you visited. Do the same thing with the Sender ID, copy and paste it at the GCM Sender ID field.
2. Download google-services.json
Now, you have to download the google-services.json file and move it to your Android Studio project inside app directory.
3. Configure your AndroidManifest.xml
Check out the complete AndroidManifest.xml file with the Firebase and Parse Server Android SDK configuration. Click here.
4. Configure your App.java or Main activity
ParseInstallation installation = ParseInstallation.getCurrentInstallation();
The deviceToken is generated by the Parse Server SDK when the application is successfully installed on the device( you don't have to manually configure it in your project).
5. Required fields
To send pushes via Dashboard, you need to have GCMSenderId, deviceToken and installationId fields configured.
You are also able to download our Github project and replace your keys to check it working:
Note: Please, don't forget to replace with your google-services.json file.
Did you run the tests and it's not working yet? Please contact us anytime, we will specifically check your case!
Please sign in to leave a comment.