Android app shuts down when screen goes off [Ticket In]


Really, really enjoying Roon so far! I do have a question though. On my Samsung galaxy s7, the roon app completely shuts down when the screen is shut off by me, or times off. In other words, if you have an app open, click off the screen and turn it back on, the same app is still there. With Roon, you get the home screen when the screen wakes up. You then have to click on the app, and it takes several seconds to boot up to the current track screen, etc. This does not effect music playback whatsoever so I wouldn’t call it a severe hardship. But I’m wondering if it’s possible to keep the app awake and in the foreground so to speak, as with other apps.

I have the roon server on my windows 10 media streaming wirelessly to a raspberry pi/hifiberry with volumio. With the Android app as a remote. Happy to provide other info if needed. Very impressed with Roon so far, overall.

1 Like

Perhaps these settings might help - Why won't Roon Android stay connected while in the background? ? Might need tweaking for different Android version though.

I ran into the same issue after my tablet got updated to Android 8 about a year ago:

The workaround I use is in the fourth post.

Thanks for the suggestions, but they did not work unfortunately. In addition to those ideas I also set Roon to be an unmonitored app & had high hopes for that solution, but it too did not work. Restarted phone but same thing. App is still crashing when the screen sleeps. It’s the only app I’ve ever used that behaves this way when it is n the foreground as the current or last app used.

In the thread referenced by Jan, Roon staff said they were able to reproduce the issue and were going to fix it? Wonder what became of that.

Okay so some additional information. Changing those settings had some effect. App no longer crashes when you go back and forth between it and another app. Also, interestingly, if you are in roon, change to another app, turn off the screen, turn on the screen, and click back to the home screen and click the Roon icon - It’s still on, doesn’t have to reboot.

So it only exhibits the behavior now, when the app is the current one, and the screen is shut off, either by timing out or by clicking the power button. Does not crash when another app is in use when the screen goes off. Weird. Any additional suggestions for a fix?

I guess that’s progress of sorts! Given the behaviour now replicates what appears to be a known bug, I’m not sure what else to suggest. Interestingly it crashed for the first time on me on an Android 5 device the other day, when the screen was off, so I do wonder if there has been any change of late related to this.

Never crashes for me. It does ways reconnect though when brought from sleep.

same on my Samsung S8. Turning display off and on again while roon is the active app causes roon to crash…

1 Like

@support Hi everybody, new Android version still does not fix this issue. Are you aware of this bug? Thanks for your answer! Have a nice day

Hi @Boris_Schaedler,

In the last Android update we published, we made a few Android system-level changes but these changes do not affect the playback portion of the Android app, that is something that is still currently in the development queue.

When the dev team completes the audio-portion there will be another Android update but I can’t comment on a timeline of when the changes will be complete, they will also have to pass QA testing first. I appreciate your patience until then!

– Noris

If you change batteyr optimisatoin to not run on the app it can help the app stay running.

@noris Thanks for your answer. I’m not sure if you understand the issue correctly (your answer is no answer to my question), so let me explain it again. This happens on my Samsung S8 (other users do have the same problem as you can read in the very first post in this thread):

  1. open roon app
  2. turn of display by short pressing power button of the phone (or: wait until display times out and is turned off by the OS)
  3. turn on display by short pressing power button of the phone
  4. => roon app crashes and is closed

So let me ask again: Are you aware of this bug? Is anybody fixing it?

Thank you!

Hi @Boris_Schaedler,

Thanks for clarifying the error state further. I just spoke to the QA team and yes, we are aware of similar behavior for some Android devices and have an active ticket regarding this.

We are hoping to address a few Android-specific issues in a follow-up Roon release but I can’t say for sure when it will be completed, just that this behavior is in the queue and is being tracked.

Thanks again for the report here!

– Noris

Thanks for the update! @noris


Good morning,

here is some output from ‘logcat’ (scroll to the right to see the error):

2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:] JNI DETECTED ERROR IN APPLICATION: java_class == null
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]     in call to GetMethodID
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]     from void com.roon.NativeActivityWithIntent.roonRun(android.content.res.AssetManager)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:] "Thread-6" prio=5 tid=13 Runnable
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   | group="main" sCount=0 dsCount=0 flags=0 obj=0x12f006f8 self=0x777b116400
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   | sysTid=16871 nice=-4 cgrp=default sched=0/0 handle=0x77657ff4f0
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   | state=R schedstat=( 3957184766 77145928 4550 ) utm=318 stm=77 core=0 HZ=100
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   | stack=0x77656fc000-0x77656fe000 stackSize=1041KB
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   | held mutexes= "mutator lock"(shared held)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #00 pc 00000000003cb64c  /system/lib64/ (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+220)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #01 pc 000000000049b290  /system/lib64/ (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const+352)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #02 pc 00000000002ec874  /system/lib64/ (art::JavaVMExt::JniAbort(char const*, char const*)+972)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #03 pc 000000000033a134  /system/lib64/ (art::JNI::GetMethodID(_JNIEnv*, _jclass*, char const*, char const*)+1468)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #04 pc 0000000000005350  /data/app/ (offset 9ab000) (JNICreateSurface+76)
2019-05-04 07:04:00.802 16825-16871/? A/com.roon.mobil:]   native: #05 pc 000000000000bfec  <anonymous:7747664000> (???)
2019-05-04 07:04:00.803 16825-16871/? A/com.roon.mobil:]   at com.roon.NativeActivityWithIntent.roonRun(Native method)
2019-05-04 07:04:00.803 16825-16871/? A/com.roon.mobil:]   at com.roon.NativeActivityWithIntent.access$2600(
2019-05-04 07:04:00.803 16825-16871/? A/com.roon.mobil:]   at com.roon.NativeActivityWithIntent$
2019-05-04 07:04:00.803 16825-16871/? A/com.roon.mobil:]   at
2019-05-04 07:04:00.803 16825-16871/? A/com.roon.mobil:] 

This happens with a Samsung S8 and S9. Please fix that, should be not so hard… Thanks!

It does this on my one plus 5 to. Very annoying.

Hi @Boris_Schaedler,

Thanks for submitting that additional logcat output, I have forwarded it to QA for review.

As I mentioned previously we are working on a few Android tickets at the moment and making improvements in this area so I will submit your logcat output to the current investigation.

I can’t say for sure when the next Android build will be completed but thank you for the additional info.

– Noris

A post was split to a new topic: Android 10 crashes when screen is turned off