I followed all steps as given in the Push Notifications training module, as well as in this Stack Overflow question: IBM Worklight - Push Notifications feature does not work
I have successfully used the Push Notifications sample application on an AVD running Android 4.3.
Worklight setup:
API Key
and senderId
in application-descriptor.xml
with the API Key
and Project Number
from the Google GCM console
Added android:targetSdkVersion="18"
in yourApp\android\native\AndroidManifest.xml
in the line:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" />
Built and deployed the app and adapter
Android 4.3
AVD setup:
Extras
section both the Google Cloud Messaging for Android Library
as well as Google Play services
Make sure to use this Google API as the Target
for your AVD:
After that I have:
Run As > Invoke Worklight Procedure
"idan","test message"
The notification was received in the AVD both when the app is open (the expected alerts were displayed) as well as closed (notification was displayed in the notification bar. Tapping it opened the app and after logging in the expected alerts were displayed).