Documentation

Parse Notification Data


Any payload data that you send with your push notifications is made available to your app via the Intent extras of your PushReceiver class.

If you were to send a push notification with the following data:

{"id": 1, "success": true, "message": "Hello World"}

Then you'd be able to retrieve each value from within your PushReceiver.java file like so:

int id = intent.getIntExtra("id", 0);
String message = intent.getStringExtra("message");
boolean success = intent.getBooleanExtra("success", false);

Note: Unlike GCM / FCM, we do not stringify your payload data, except if you supply JSON objects or arrays. This means that if you send {"id": 3}, you'd retrieve that value in the receiver using intent.getIntExtra("id", 0).