I am trying to send push notification from iOS device to android device. Android device is receiving the notification but it is not able to get published information
Here is my code on iOS side
let headers1 = ["android-ticker-text":" Order Update","android-content-title":order.orderId,"android-content-text":order.status]
let publishOptions1 = PublishOptions()
publishOptions1.assignHeaders(headers1)
let deliveryOptions1 = DeliveryOptions()
deliveryOptions.pushBroadcast(FOR_ANDROID.rawValue)
backendless?.messaging.publish("C"+order.phoneNumber!, message: "Any", publishOptions: publishOptions1, deliveryOptions: deliveryOptions1, response: { (status) in
//do nothing
print("sending android sent")
}, error: { (fault) in
//do nothing
print("sending android fault \(fault?.message)")
})
I am able to send notification hassle free.
Here is my OnMessage method on android side@Override
public boolean onMessage(Context context, Intent intent) {
prefs = new Prefs(this);
Log.v(“message recieved1”,intent.getExtras().get(“android-ticker-text”).toString());
Log.v(“message recieved2”, intent.getStringExtra(“message”));
Log.v(“message recieved3”, intent.getStringExtra(PublishOptions.ANDROID_TICKER_TEXT_TAG));
Log.v(“message recieved4”, intent.getStringExtra(PublishOptions.ANDROID_CONTENT_TITLE_TAG));
Log.v(“message recieved5”, intent.getStringExtra(PublishOptions.ANDROID_CONTENT_TEXT_TAG));
setNotification(intent.getStringExtra(PublishOptions.ANDROID_TICKER_TEXT_TAG),
intent.getStringExtra(PublishOptions.ANDROID_CONTENT_TITLE_TAG), intent.getStringExtra(PublishOptions.ANDROID_CONTENT_TEXT_TAG),
intent.getStringExtra(“message”));
return false;
}And here is my output in log after receiving the message
10-06 01:19:32.627 18522-19660/ssapps.com.unitedkitchen V/message recieved2: Any
I am not able to see other information.
Any suggestions?