android - GCM demo won't accept messages on server & app restart -


i followed demo client/server tutorial android docs have provided (http://developer.android.com/google/gcm/demo.html). worked advertised when first tried out. servlet first came "no devices registered!" screen, started demo app on device , able send demo messages device fine.

then shutdown tomcat server deployed gcm-demo war , closed demo client app on device (which not emulator, nexus 7). started tomcat server up, see did deploy gcm-demo war expected when go url of servlet (the 1 said "no devices registered!") says no devices registered. opened app on device , says device registered on server. why servlet not seeing device registered?

i appreciate help, thank you.

i didn't take tomcat/servlet approach myself, opting apache/php/mysql way instead, i've no direct experience, reading sample code see comment in server's datastore.java, this:

/**  * simple implementation of data store using standard java collections.  * <p>  * class thread-safe not persistent (it lost data when  * app restarted) - meant example.  */ 

so when restart tomcat it's forgotten regid.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -