Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash - android.app.BackgroundServiceStartNotAllowedException #336

Open
Jean-BaptisteC opened this issue Sep 7, 2023 · 3 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@Jean-BaptisteC
Copy link
Contributor

Exception android.app.BackgroundServiceStartNotAllowedException:
  at android.app.ContextImpl.startServiceCommon (ContextImpl.java:1918)
  at android.app.ContextImpl.startService (ContextImpl.java:1874)
  at android.content.ContextWrapper.startService (ContextWrapper.java:827)
  at android.content.ContextWrapper.startService (ContextWrapper.java:827)
  at org.eu.exodus_privacy.exodusprivacy.MainActivity$startInitial$1.invoke (SourceFile:10)
  at org.eu.exodus_privacy.exodusprivacy.MainActivity$startInitial$1.invoke (SourceFile:1)
  at org.eu.exodus_privacy.exodusprivacy.MainActivity$sam$androidx_lifecycle_Observer$0.onChanged
  at androidx.lifecycle.LiveData.c (SourceFile:30)
  at androidx.lifecycle.LiveData.d (SourceFile:16)
  at androidx.lifecycle.LiveData$c.h (SourceFile:24)
  at androidx.lifecycle.LiveData$LifecycleBoundObserver.d (SourceFile:30)
  at androidx.lifecycle.x$b.a (SourceFile:25)
  at androidx.lifecycle.x.h (SourceFile:83)
  at androidx.lifecycle.x.p (SourceFile:80)
  at androidx.lifecycle.x.l (SourceFile:35)
  at androidx.lifecycle.x.i (SourceFile:15)
  at androidx.lifecycle.l0$b.a (SourceFile:41)
  at androidx.lifecycle.l0$c.onActivityPostStarted (SourceFile:10)
  at android.app.Activity.dispatchActivityPostStarted (Activity.java:1496)
  at android.app.Activity.performStart (Activity.java:8611)
  at android.app.ActivityThread.handleStartActivity (ActivityThread.java:3922)
  at android.app.servertransaction.TransactionExecutor.performLifecycleSequence (TransactionExecutor.java:221)
  at android.app.servertransaction.TransactionExecutor.cycleToPath (TransactionExecutor.java:201)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:173)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2437)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:211)
  at android.os.Looper.loop (Looper.java:300)
  at android.app.ActivityThread.main (ActivityThread.java:8294)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1028)

@Jean-BaptisteC Jean-BaptisteC added the bug Something isn't working label Sep 7, 2023
@Jean-BaptisteC Jean-BaptisteC added the help wanted Extra attention is needed label Dec 27, 2023
@Jean-BaptisteC Jean-BaptisteC pinned this issue Dec 27, 2023
@theimpulson
Copy link
Contributor

Migration to WorkManager should be considered that will also allow to automatically update the database in background.

@Jean-BaptisteC
Copy link
Contributor Author

Jean-BaptisteC commented Mar 19, 2024

I didn't like WorkManager:

  • Take too much space
  • Need new permissions
  • Need a own room database

And with most version of Android, background service is too restrictive and need regularly to update code to respect rules of Google.

@Jean-BaptisteC Jean-BaptisteC unpinned this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants