Ibm Worklight - Android Push Notification Sent But Not Received
I am new to IBM Worklight and I am trying to get push notification to work on my Android device. I have followed the 'Push notification in hybrid applications' tutorial on their we
Solution 1:
Push Notifications in Worklight work for me when following the below instructions:
- Installed Worklight Studio v6.2 from the Eclipse Marketplace
- Downloaded and imported the Push Notifications sample project
Used my GCM ID and GCM Key in application-descriptor.xml
- The GCM ID is the "project number". You can find it once logging into the GCM Console and into the project you create
- The GCM Key is the "Browser" key you create in your GCM project under Credentials > Create key
- Setup the Android SDK with Google API level 19 & Google Play Services
Created an AVD using the Google API (not to be confused with Android 4.4.2 level 19)
- This is especially important: when testing in the Android Emulator you need to use the Google API and not the Android API
- When testing in a physica device, you can use the Android API
- Right-click on the adapter folder > Run As > Deploy Worklight Adapter
- Right-click on the application folder > Run As > Run on Worklight Development Server
Right-click on the generated Android project > Run As > Android application
The AVD launches, application is installed
- Logged-in with "Idan"
- Right-click on the adapter folder > Invoke Worklight Adapter
- Entered
'Idan','test notification'
and clicked on the OK button
In the device, the alert()s from the application's JavaScript start popping, indicating the notification was received.
The above was tested in my home network, so I would suggest to double-check that you followed the above as well as check again your network settings. Take a look at slide #53 in the Push Notifications training module.
Post a Comment for "Ibm Worklight - Android Push Notification Sent But Not Received"