Hi,
I am following the steps in the GCM tutorial
If i use the B4a hosted server and all the scripts as mentioned in the example - i have no problems in registering the device and getting a test message back. Great!
PROBLEM:
Now i did the following:
- setup a linux server on my intranet and httpd + php + mysql
- edited the PHP script and set the database name / user / password .
-changed the board url value in the device app to match the location of my hosted php file
I can now successfully register my device "TestDeviceName" on my own server and database
However - when I try to send message to my device:
java -cp b4a_gcm.jar anywheresoftware.b4a.c2dm.C2DM send TestDeviceName DUMMYMSG
I get the following error:
java.lang.RuntimeException: Error=InvalidRegistration,name=TestDeviceName removed from database.
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:67)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:218)
I am not sure what is happening and cannot debug the C2DM class..any help appreciated. As i said - i am getting the "Registration Successful" message on my local server...but not sure why i cant get the message..
I am following the steps in the GCM tutorial
If i use the B4a hosted server and all the scripts as mentioned in the example - i have no problems in registering the device and getting a test message back. Great!
PROBLEM:
Now i did the following:
- setup a linux server on my intranet and httpd + php + mysql
- edited the PHP script and set the database name / user / password .
-changed the board url value in the device app to match the location of my hosted php file
I can now successfully register my device "TestDeviceName" on my own server and database
However - when I try to send message to my device:
java -cp b4a_gcm.jar anywheresoftware.b4a.c2dm.C2DM send TestDeviceName DUMMYMSG
I get the following error:
java.lang.RuntimeException: Error=InvalidRegistration,name=TestDeviceName removed from database.
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:67)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:218)
I am not sure what is happening and cannot debug the C2DM class..any help appreciated. As i said - i am getting the "Registration Successful" message on my local server...but not sure why i cant get the message..