Please help me since I am stuck !!! I created an app. in my eclipse that gives me the regid for the client side. I created in asp - server side and I am sending a notification to my android. I am getting this message from the server side:
id=0:1369942608307759%5252b7a166d6cf16 but nothing in my phone.... Why ? what do I have to do in order to get notification in my mobile ? It seems that every thingis going fine but for some reason I am not getting the notification...does any one knows what can go wrong ?
Related
I have used the loopback sample application "loopback-3.x" given on:https://github.com/strongloop/loopback-example-push. The correct server key was given in config, then created an application and registered a device with that application. Then I tried sending a push notification with "notifyById" method. The console shows a succes message like:
loopback:component:push:provider:gcm Sending message to ["devicetokengiven"]: {"params":{"timeToLive":3600,"data":{"message":"sfwsed","messageFrom":"sdefsdf","badge":2}}}
loopback:component:push:provider:gcm GCM result: {"multicast_id":multicast_id,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:23423555466%24324434354"}]}
It seems to be a success, but the device doesnt get any push notification. What could be the issue? Any help would be appreciated! Thanks!
Unfortunately their last release simply doesn't work with FCM. However, in their last commit they have a change which requires an object with the attributes (messageFrom and alert) and then they convert these att to body and title. Moreover, there is a PR where someone adds another notification's attributes, but I don't think it will be merged soon.
Solutions:
Reference your module to their last commit: "loopback-component-push": "git://github.com/strongloop/loopback-component-push.git#dce16d9be30d80e258c2ac5e3dc1f74276f2b0cd"and send {messageFrom: "your title", alert: "your body"}
or
Use a simple FCM node module or even a HTTP request. Will make your life much easier.
I am trying to use Ionic Push for Push Notifications. I have successfully registered with the server and got the Token ID also (Called reg_id in Ionic).
I have followed all the steps as shown in Ionic Docs here http://docs.ionic.io/v1.0/docs/push-install.
But now when I try to send push notifications using the curl command, the notification is shown as sent but is never received by the app. If I check the status, I get the status as success. Please help
Comtroller Code: https://gist.github.com/samarthagarwal/833064a2de0660e826b6
Any suggestions are highly appreciated.
In my app receives the push notification from GCM(for android) everything is fine am getting the notification but the payload is null. Cross checked server side script it's fine. This is the response am getting in callback method
This is the GCM response
{"type":"callback",
"source":{"pushType":"gcm", "invocationAPIs":[],
"showAppOnTrayClick":true,
singleCallback":false,
"__propertiesDefined__":true,
"bubbleParent":true,
"_events":{"callback":{},
"trayClickLaunchedApp":{},
"trayClickFocusedApp":{}},
"focusAppOnPush":false,
"enabled":false,
"showTrayNotificationsWhenFocused":false,
"apiName":"Ti.Module",
"showTrayNotification":true,"debug":false},
"payload":"","bubbles":false,
"cancelBubble":false}
Am using Titanium 3.5.1GA and tried with ti.cloudpush(3.3.7) same issues .
How can i solve it?
Since the notification does arrive it's probably not an error in the app but on the server sending the payload. Try one of the several (online) apps to test notifications on Google.
I am working on an android app that will recieve push notifications from the GCM server.
I am using php as the 3rd-party server.
I've a few questions.
When I send request to gcm server from my php script it gives me the following response
{"multicast_id":8799227316277290616,"success":1,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1341388064110557%5d17b789f9fd7ecd"}]}
Now the response seems fine but you can see a % sign in the message_id. Is that ok? if it's not than how am I able to recieve the correct message_ID?
When I use json_decode in my php script and echo this multicastid it gives me something like this
8.7992273162773E+18
and I am sure it will give the same type of value when I'll echo message_id also. So why it is not echoing the correct value?
My last question is that when I send this request which seems right and open my android application there is no notification there. Is it caused by the above errors or there is some other problem?
I had a similar issue with C2DM. The reason was that the android app name was not the same for which I requested the quota. It got fixed once the corrected the package name.
In my case, android application was not running so the push notifications can't be received. I started the app and then I could receive messages.
I was glad to implement smack on android via local Openfire server where it connects to Gmail server-host and it worked like charm. The tutorial found here
But I'm getting an error (pasted below) when I'm trying to connect two users via android emulators with a local Openfire server installed.
03-23 16:24:01.392: DEBUG/SMACK(233): 04:24:01 PM SENT (1155246128): <message id="t0tgA-5" to="justestingchat2" type="chat"><body>hi</body></message>
03-23 16:24:07.032: DEBUG/SMACK(233): 04:24:07 PM RCV (1155246128): <message id="t0tgA-5" to="justestingchat#admin-pc/Smack" from="justestingchat2" type="error"><error code="404" type="cancel"><remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></message>
03-23 16:24:07.062: INFO/System.out(233): Received message: null
Here are some of my system level description:
I'm trying to connect two users with different user name, e-mail and passwords via two emulators in android.
Both the user show "Presence - Available" in the dashboard of Openfire when they are logged in Presence presence = new Presence(Presence.Type.available);
From the Error code pasted above the Message Id is same and i guess there is no problem with that. (correct me if I'm wrong)
I use the Packet Listener as provided in the tutorial above code
I also tried using chat manager in listening to the message using this code
but no use it returned "Null"
Please can some one help me what's actually wrong? If it could work with google talk why not local server? Or is it may be because of using emulator?
UPDATE 1:
For finding out where the problem is! I downloaded Spark client and did some testing. I have found out that I'm able to send packets/messages from Spark to Android Client but not from Android to Spark, which gives me a Error 404! Can any one still help me with atleast some clues please?
Your Android code is wrong. You are sending your message to a Jid which does not include the xmpp domain justestingchat2. Try to send your message to justestingchat2#admin-pc