Reputation: 1
I'm trying to add push notifications GCM to my app but I can't get the sample project to work.
This is what I did:
+Registered project id and API key at Google
+Entered id and key in application-descriptor.xml like so:
< pushSender key="XXX"senderId="YYY">
+Deployed adapter
+Built the app ("Build all and deploy", Android SDK API 18, Google API 18) And I have read http://www.ibm.com/developerworks/mobile/worklight/getting-started.html Push notifications
Please tell me why? I can't write
< pushSender key="XXX" senderId="YYY">
It is error but when I write
< pushSender id="XXX" password="YYY">It is ok.
I try to fill ID with SENDERID and PASSWORD WITH KEY but error when I run android amulator
Upvotes: 0
Views: 59
Reputation: 44516
This is invalid: <pushSender id="XXX" password="YYY">
This is valid: <pushSender key="XXX" senderId="YYY"/>
From what you are writing, the second option does pass the build, but fails in the Android Emulator; it likely fails for you because you did not properly configure the Android project for push notifications when tested in the Android Emulator - this is especially important as the configuration differs between device and emulator.
It'd help if you would've mentioned the error you're talking about...
You can follow full instructions in these question:
Upvotes: 1