Android Question Solved: Error with Push Service Android 5

Discussion in 'Android Questions' started by bgsoft, Feb 18, 2015.

  1. bgsoft

    bgsoft Well-Known Member Licensed User

    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

     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. bgsoft

    bgsoft Well-Known Member Licensed User

    Thank you very much Erel
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice