bgsoft Well-Known Member Licensed User Longtime User Feb 18, 2015 #1 Hello I have an application that works well when registering for push service: Code: Dim i AsIntent i.Initialize("com.google.android.c2dm.intent.REGISTER", "") i.PutExtra("sender", PushSenderId) In the manifest, there are put this line: <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="21"/> A customer has installed Android 5 on your Nexus 4 and gives this error in the Google Developer Console in "Errors and ANR" : java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at anywheresoftware.b4a.keywords.Common$5.run(Common.java:965) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at anywheresoftware.b4a.BA.raiseEvent2(BA.java:201) at anywheresoftware.b4a.keywords.Common$5.run(Common.java:962) ... 8 more Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1674) at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1703) at android.app.ContextImpl.startService(ContextImpl.java:1687) at android.content.ContextWrapper.startService(ContextWrapper.java:515) at anywheresoftware.b4a.keywords.Common.StartService(Common.java:726) at bgs.ayuntamientovallirana.pushservice._registerdevice(pushservice.java:788) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175) What could be the problem? With Android versions below 5 in the same device and the same application did not have any error. Thank You
Hello I have an application that works well when registering for push service: Code: Dim i AsIntent i.Initialize("com.google.android.c2dm.intent.REGISTER", "") i.PutExtra("sender", PushSenderId) In the manifest, there are put this line: <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="21"/> A customer has installed Android 5 on your Nexus 4 and gives this error in the Google Developer Console in "Errors and ANR" : java.lang.RuntimeException: java.lang.RuntimeException: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at anywheresoftware.b4a.keywords.Common$5.run(Common.java:965) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5221) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at anywheresoftware.b4a.BA.raiseEvent2(BA.java:201) at anywheresoftware.b4a.keywords.Common$5.run(Common.java:962) ... 8 more Caused by: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) } at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1674) at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1703) at android.app.ContextImpl.startService(ContextImpl.java:1687) at android.content.ContextWrapper.startService(ContextWrapper.java:515) at anywheresoftware.b4a.keywords.Common.StartService(Common.java:726) at bgs.ayuntamientovallirana.pushservice._registerdevice(pushservice.java:788) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:175) What could be the problem? With Android versions below 5 in the same device and the same application did not have any error. Thank You
Erel B4X founder Staff member Licensed User Longtime User Feb 18, 2015 #2 See this post: https://www.b4x.com/android/forum/threads/b4x-push-server.48560/#post-302375 Upvote 0
bgsoft Well-Known Member Licensed User Longtime User Feb 19, 2015 #3 Thank you very much Erel Upvote 0