Android push notification (C2DM) framework

JATAIDE

Member
Licensed User
Longtime User
Hello

When I compile and run the program it gives no error. When I put the text sometimes gives "Name not valid" and other ends.
Appears in the following logs


B4X:
PackageAdded: package:localiza.mapa


** Activity (main) Create, isFirst = true **


** Activity (main) Resume **


** Service (pushservice) Create **


** Service (pushservice) Start **
pushservice_registerdevice (java line: 238)



java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } without permission com.google.android.c2dm.permission.RECEIVE
   at android.app.ContextImpl.startService(ContextImpl.java:840)
   at android.content.ContextWrapper.startService(ContextWrapper.java:336)
   at anywheresoftware.b4a.keywords.Common.StartService(Common.java:683)
   at localiza.mapa.pushservice._registerdevice(pushservice.java:238)
   at localiza.mapa.pushservice._service_start(pushservice.java:260)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:521)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:89)
   at localiza.mapa.pushservice.handleStart(pushservice.java:61)
   at localiza.mapa.pushservice.onStartCommand(pushservice.java:46)
   at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3059)
   at android.app.ActivityThread.access$3600(ActivityThread.java:126)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2101)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:123)
   at android.app.ActivityThread.main(ActivityThread.java:4633)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:521)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
   at dalvik.system.NativeStart.main(Native Method)
** Service (pushservice) Create **


** Service (pushservice) Start **
pushservice_registerdevice (java line: 238)
Thank you

JATAIDE
 
Last edited:

JATAIDE

Member
Licensed User
Longtime User
Thank you

Erel OK, once again thank you. I really had the wrong file. Now all is well. It's amazing the assistance given to our questions which makes me feel ever more fascinated by this programming language.

Thanks again
 
Upvote 0