Getting errors in sample project given?

0 votes

       We are trying to use app42 for push notification service for our phonegap app. We were following  your tutorial steps given here . When we try to build the project we are getting error that gcm library file is missing

This line:


.So we added google play service and obsolete google android cloud messaging library in android sdk manager and linked to our project.But still we are getting the error .Please guide us on whate we did wrong.So we can start using app 42 for our apps.
asked Sep 2, 2015 in App42 Cloud API-BaaS by Inian Bharathi (10 points)

1 Answer

0 votes
Hi Inian,

As we Google depricated the old GCM library so we have removed that as well. You just add google_play_services as a library project and clean and build the project, it will working fine.

Let me know if it helps.

Thanks & Regards

Vishnu Garg
answered Sep 2, 2015 by Vishnu Garg (674 points)
Hi Vishnu,
                Already tried that still i am getting the error.Can you please send a working sample project.
You can find it on GitHub
Also check the BuildPath if there is any library GCM.jar just remove it.
Hi Vishnu,
                 Thanks for your support now we are able run the sample project but we

don't receive push notification.We even tried running the project on device.

Please help us. When we give push to all no push message is recieved
As per attched screen shots you are unable to register Push on GCM as google_play_services are not available on simulator.
If Your are testing the same on device please share the application logs so its easy for us to trace the problem you are facing.
 Have you have followed all the steps mentioned on website and ReadMe file?
Please also enable Push Logs from AppHQ in AppSettings option.
Can you able to see any user on AppHq Dashboard in Push section of unified Notification.
Also share Push Logs in that you are able to see on AppHq dashboard while sending message to desired User from AppHq console.
Logs that you have shared doesn't contain any information regarding Push registration and receive.
No vishnu we tried that too.Main issue is we don't get user added to dash board even after running our app on our device.
Please also varify the apiKey and SecretKey you have link in index.html file.I found both are same in the sample you have shared wit us.
Thanks for your support.We got user registration now.But push notification is not received.We get following error in push logs in our dash board.

Push Android Worker Exception : HTTP Status Code: 401
Please make sure that server Key that you are setting in AppHQ is correct. Also, while creating the Server Key in Google Console, please make sure that IP section is set to blank and does not have any white list IPs there.
You can refer the answer
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on