-
Notifications
You must be signed in to change notification settings - Fork 1.9k
No Sound and vibration #242
Comments
@omaisali platform? plugin version? payload sent to device? |
i am able to receive the registration id from gcm to my app. how to sent platform, plugin version, payload to the device? My code is like: var push = PushNotification.init({ "android": {"senderID": "48XXXXXXXXXX6", "icon": "phonegap", "iconColor": "blue"}, |
@omaisali I meant, what platform are you testing on, iOS or Android? What version of the plugin are you using? What does the JSON you are sending to the device from the push service look like? |
Android, plugin 1.3.0, I am just sending registration id to my server in POST and want to test the response. // php code is here.
|
@omaisali when you get the notification is the app in the foreground? If so you won't get sound or notification unless you do it yourself. When the app is in the background the notification gets put in the shade and it should vibrate and ding. Lemme know. |
as soon as i receive the registration id, i am sending that registration id to server and server response. I am not getting any msg but the alert which i have set. check my code.
|
n just get this alert("You have new message"); |
@omaisali right because your app is in the foreground and this is expected behaviour. Mimimize/put the app in the background and send a push. You will get sound. |
you mean i need to make any event or any timer to send the request to the server when app is in background. thn i will get notification? |
@omaisali here are the steps so you will have your device vibrate/play sound on notification.
When you app is in the foreground it is up to you if you want to vibrate or play a sound. You get to choose how to respond to the push. Make sense? |
ok. i think now i got the point. leme try that. |
I used node-gcm to send notification. it is working and showing this. { multicast_id: 8737520860603611000, but no notification . app is in the background |
@omaisali what data are you sending to the device? |
when i open the app, i receive the alert. but when app is in the background, no notification or nothing. |
once i changed the code in the GCMIntentService by the suggestion of someone on stackoverflow. but when i change back to original. I am getting notifications now. |
This thread has been automatically locked. |
Hi,
I am able to receive the message from server when app is running. but not getting any sound and vibration nor any notification.
The text was updated successfully, but these errors were encountered: