android-getting-started-samples
android-getting-started-samples copied to clipboard
Unable to start receiver CdsReceiver. Not allowed to start service Intent. Android 8.0.
Hello!
In the latest version of Android OS, The App is not allowed to perform usual background work we used to do before. So, in the result, when you start that CdsService, sometimes the App is in the background and the error occurs.
Please, fix the issue.
The message from Fabric.io:
Fatal Exception: java.lang.RuntimeException Unable to start receiver com.adobe.creativesdk.aviary.internal.cds.CdsReceiver: java.lang.IllegalStateException: Not allowed to start service Intent { act=aviary.intent.action.CDS_DOWNLOAD_START cmp=com.drive2/com.adobe.creativesdk.aviary.internal.cds.CdsService (has extras) }: app is in background uid UidRecord{fb5a8ae u0a121 RCVR idle procs:1 seq(0,0,0)}
It happens somewhere there:
com.adobe.creativesdk.aviary.internal.cds.CdsReceiver.handlePackageReplaced (SourceFile:123) com.adobe.creativesdk.aviary.internal.cds.CdsReceiver.onReceive (SourceFile:103)
Libraries' versions:
com.adobe.creativesdk.foundation:auth:0.9.1251 com.adobe.creativesdk:image:4.8.4
Any updates on this @relaxedSoul ?
@RTimal still get crashes on the active devices sometimes. Nothing changed.
Issue on Android 8.0 and above:
java.lang.RuntimeException:
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3399)
at android.app.ActivityThread.-wrap18 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1780)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6940)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
Caused by: java.lang.IllegalStateException:
at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1538)
at android.app.ContextImpl.startService (ContextImpl.java:1484)
at android.content.ContextWrapper.startService (ContextWrapper.java:663)
at android.content.ContextWrapper.startService (ContextWrapper.java:663)
at com.adobe.creativesdk.aviary.internal.cds.CdsReceiver.handlePackageReplaced (CdsReceiver.java:123)
at com.adobe.creativesdk.aviary.internal.cds.CdsReceiver.onReceive (CdsReceiver.java:103)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3392)
Getting this crash very frequently even after updating to the version -
compile 'com.adobe.creativesdk.foundation:auth:0.9.2006-5'
compile 'com.adobe.creativesdk:image:4.8.4'
I'm experiencing the very same problem and found a migration article that states to remove the CDS Service because the SDK is now responsible for this operations.
Here is the article: https://creativesdk.zendesk.com/hc/en-us/articles/211241666-Android-migration-guide-from-0-9-7-to-0-9-1062
Update
The above solution shared by me is not working. Every time the app has been updated - this crashes starts popping up... I don't know how could be handled by us...
Hello,
Having the same issue any updates on this?
Thanks!
Try removing this part
Intent cdsIntent = AdobeImageIntent.createCdsInitIntent(getBaseContext(), "CDS");
startService(cdsIntent);
@superandrew213 where is this intent?
@Seishin unfortunately that won't fix it. The issue is with the background thread.
Maybe there is a way to catch and silence this exception?