I'm trying to add push notifications to my app but I can't get the sample project to work.
This is what I did:
- Downloaded sample project
- Opened in Worklight 5.0.6
- 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)
- Checked worklight console's Push Notifications tab (app and adapter are listed there) and the push notification tab
- Started the app in android emulator (4.3)
- In sample app, logged in with user "spyro", password "test"
- Got an error:
Failed registering for push notifications. The application will not be able to receive notifications
LogCat gives me the following messages:
10-22 06:07:11.178: E/SQLiteLog(2600): (14) cannot open file at line 30191 of [00bb9c9ce4] 10-22 06:07:11.178: E/SQLiteLog(2600): (14) os_unix.c:30191: (2) open(/CachedGeoposition.db) - 10-22 06:10:58.392: W/WLDroidGap(2600): unregisterReceivers:Receiver not registered: com.worklight.androidgap.plugin.Push$1@b419ff38 10-22 06:10:58.402: W/WLDroidGap(2600): unregisterReceivers:Receiver not registered: com.worklight.androidgap.plugin.Push$3@b41a0458 10-22 06:10:58.442: E/PushApplication(2600): Error while trying to retrieve device token from the mobile operating system.