Hi!
I've 2 questions:
1. I'm trying to send push-notification from Android to iOS with conditions ( "badge", "sound" .. ) like this:
String message = "Hello";
PushNotificationService pushNotificationService = App42API.buildPushNotificationService();
HashMap<String, String> otherMetaHeaders = new HashMap<String, String>();
otherMetaHeaders.put("dataEncoding", "true");
otherMetaHeaders.put("alert", message);
otherMetaHeaders.put("badge", "1");
otherMetaHeaders.put("sound", "default");
pushNotificationService.setOtherMetaHeaders(otherMetaHeaders);
pushNotificationService.sendPushMessageToChannel(channel, otherMetaHeaders, new App42CallBack() { .....
But the message hasn't been sent. What i'm doing wrong?
2. How i can receive only message text on push-notification from iOS ? I use Android and in push-notification i can see all conditions from IOS message like this: {"badge:1", "sound:default", ////"} .
My GCMIntentService:
@Override
protected void onMessage(Context context, Intent intent) {
String message = intent.getExtras().getString("alert");
displayMessage(context, message);
generateNotification(context, message);
}
Tried to put instead "alert" "message" - no result. What i'm doing wrong?