I have a problem sending push notifications in Andoid using Parse. I have a project in iOS and I recive all push notifications perfectly. But in Android, when I want to send a Push Notification using parse platform I recive the following message:
Sender is not allowed to send messages.
Any tips?
Best Regards!
Related
I am using Amazon SNS for push message in my android app. I want to send push messages from one android app/device to another and I am not able to find any documentation for this. Is there a way I can send upstream message to the server from a device/app which will be delivered to another device.
I've implemented GCM Push Notification in the server and in my android device .
Im able to send push notification from the server and receive it in my device.
Now im trying to send push notification from my device to the server.
Is it possible?
I heard about upstream messages but didnt found anything about it.
Thanks.
Is there any way through which one can send push notifications to specific user/device? This both question gives me enough understanding to send push notification to android devices:
PhoneGap Build Push Notification (Android)
Push notification in Android and Phonegap
If I want to send notifications to specific users in Cordova, how can I send?
For this purpose your will need:
A server that can authenticate your users and store their push notification IDs.
A cordova plugin that will accept push notifications sent from your server and pass it on to your application.
For the cordova plugin, I'd suggest PushPlugin
Assuming you have a server where your user credentials are stored, add structure and an API to store user's push notification IDs and methods to send notifications to selected users. All this will depend on what platform you choose for your server.
in your server Send a message using GCM HTTP connection server protocol:
https://gcm-http.googleapis.com/gcm/send
Content-Type:application/json
Authorization:key=<API KEY>
{
"to": "GCM ID",
"data": {
"message": "This is a GCM Topic Message!",
}
}
If you change the GCM id with the specific users GCM id you can send the push notification to the specific user for more details please go through the following link
http://phonegaptut.com/2016/05/31/how-to-send-push-notifications-in-phonegap-application/
I'm using PushWoosh services for handling push notifications on my PhoneGap based app.
But i have a problem with handling native push messages.
If i send the push notification over PushWoosh API or Management Panel it comes to device like this:
{"title":"test message","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true,"p":"["}
But if i send the push notification via Google Native Push Services with this payload:
{"title":"test title"}
It comes to device as:
{"message":"{\"title\":\"test title\"}","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true}
So this cause the title not shown on the notification ğanel if i send the push message over Google Services.
Here's my question: How can resolve this? What is the best way to show title on notification panel with sending message via Google?
Edit:
I found the problem on myself :) My code was using json_encode as twice to encode the message. I remove one of them and the problem was
resolved.
I'm working on android app in which I need to send the JSON through the push notification. Can I send it using push notification or is there any limitation in the message length.