-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
ux/uiUser Experience (UX) / User Interface (UI)User Experience (UX) / User Interface (UI)
Description
Description
The ScreenOnReceiver isn't triggering on Android API level 34 and newer due to a BackgroundServiceStartNotAllowedException
.
Implement a fix so that the app launches automatically when there are pending reviews (e.g. words or letter-sound correspondences).
2025-07-19 17:29:28.006 7977-7977 AndroidRuntime ai.elimu.kukariri.debug E FATAL EXCEPTION: main
Process: ai.elimu.kukariri.debug, PID: 7977
java.lang.RuntimeException: Unable to create application ai.elimu.kukariri.BaseApplication: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=ai.elimu.kukariri.debug/ai.elimu.kukariri.service.ScreenOnService }: app is in background uid UidRecord{e85ad9f u0a380 CEM bg:+197ms idle change:idle|cached|procstate|procadj procs:0 seq(1280565,1280534)} caps=LCMNFUA
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7639)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2487)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:258)
at android.os.Looper.loop(Looper.java:356)
at android.app.ActivityThread.main(ActivityThread.java:8836)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:966)
Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=ai.elimu.kukariri.debug/ai.elimu.kukariri.service.ScreenOnService }: app is in background uid UidRecord{e85ad9f u0a380 CEM bg:+197ms idle change:idle|cached|procstate|procadj procs:0 seq(1280565,1280534)} caps=LCMNFUA
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1997)
at android.app.ContextImpl.startService(ContextImpl.java:1952)
at android.content.ContextWrapper.startService(ContextWrapper.java:848)
at ai.elimu.kukariri.BaseApplication.onCreate(BaseApplication.kt:17)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1403)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7633)
at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2487)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:258)
at android.os.Looper.loop(Looper.java:356)
at android.app.ActivityThread.main(ActivityThread.java:8836)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:966)
2025-07-19 17:29:29.709 8115-8115 ai.elimu.k...nOnService ai.elimu.kukariri.debug I onStartCommand
See:
- https://developer.android.com/reference/android/content/Intent#ACTION_SCREEN_ON
- https://developer.android.com/reference/android/view/Display#STATE_ON
Why?
Reviewing previously learned content is crucial for a student's long-term memorization.
elimu.ai's mission is to build innovative learning software that empowers out-of-school children to teach themselves basic reading📖, writing✍🏽 and math🔢 within 6 months.
Metadata
Metadata
Assignees
Labels
ux/uiUser Experience (UX) / User Interface (UI)User Experience (UX) / User Interface (UI)