Skip to content

Demo app always crashes with restricted battery settings #1549

@KUZYAVA

Description

@KUZYAVA

Describe the bug

The demo app from the Google Play Store (https://play.google.com/store/apps/details?id=io.getstream.video.android) crashes when backgrounding (minimizing/hiding) the app under specific conditions.

Steps to Reproduce:

  1. In the Android device settings, configure the following for the demo app:
    • Battery: Set to "Restricted"
    • Picture-in-picture: Set to "Not allowed"

  2. Open the demo app.

  3. Tap "Start a New Call."

  4. Tap "Start a test call."

  5. After the call is launched and running, minimize (hide) the demo app.

  6. Observe the app crash.

Observed Result:

The app crashes with the following exception:

E FATAL EXCEPTION: main
Process: io.getstream.video.android.dogfooding.debug, PID: 461
android.app.RemoteServiceException$CannotPostForegroundServiceNotificationException: Bad notification for startForeground
at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:2469)
at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2820)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Java.java:342)
at android.app.ActivityThread.main(ActivityThread.java:9638)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)

Additional Information:

• I also generated an APK (demo-app, developmentDebug) from the GitHub repository (https://github.com/GetStream/stream-video-android/tree/develop/demo-app) and was able to reproduce the crash.
• I also reproduced the crash, though less frequently, when Picture-in-picture was set to "Allowed".

Devices Tested:

• SM-A536E/DS, Android 15
• SM-S926B, Android 15
• SM-S921B, Android 15

Video:

2025-10-20.15.34.07.mp4

Possible Cause:

I suspect the crash might be related to CallStyle.forOngoingCall

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions