musicbeeremote / mbrc

MusicBee Remote for Android
https://mbrc.kelsos.net/
GNU General Public License v3.0
127 stars 24 forks source link

Connection started to drop in a minute after I replace my smartphone. #240

Open lamrongol opened 2 years ago

lamrongol commented 2 years ago

Is there an existing issue for this?

Description

First, this problem probably only happens in certain cases and we'll be not able to figure out what caused it. I'll leave it as a record just in case.

Recently I replaced my smartphone from Galaxy S9 to Galaxy S20 and re-installed MusicBee remote. Then, I noticed MusicBee remote on Galaxy S20 connection drops in a minute even if I stay in home all the time. I confirmed MusicBee remote on Galaxy S9 connection doesn't drop as long as I'm at home.

Maybe, the cause is that OS of Galasy S9 is Android 10 but Galaxy S20 is Android 12

Expectation

No response

Steps To Reproduce

No response

Environment

- App Version: v1.5.1
Android version and device is as above

Anything else?

No response

kelsos commented 2 years ago

Hey @lamrongol I will have to check it. While I don't have access to Galaxy S20 I have a pixel 6 running the latest version of Android. If it is an Android thing I will probably figure it out.

Also maybe you could enable logs on the app on the S20 and leave it until this happens, and then send me the logs?

lamrongol commented 2 years ago

@kelsos Thank you for reply.

Also maybe you could enable logs on the app on the S20 and leave it until this happens, and then send me the logs?

I found Debug Logging option but can't find logs. Should I send from feedback menu?

kelsos commented 2 years ago

@kelsos Thank you for reply.

Also maybe you could enable logs on the app on the S20 and leave it until this happens, and then send me the logs?

I found Debug Logging option but can't find logs. Should I send from feedback menu?

Yes, it will create a zip archive and it will attach it along with the mail from the feedback menu.

I managed to find some time to check stuff today. I am running a test on a Pixel 6 and on a Galaxy Tab S6 Lite to see how things go.

If you manage to send me the logs this will also help.

lamrongol commented 2 years ago

@kelsos I sent the logs.

kelsos commented 2 years ago

@lamrongol sorry for taking too long to reply, I am looking at the logs. In a lot of cases, it seems that after a while the application stops receiving pings and disconnects. I will see if I can figure out something, but in the meanwhile could you try the instructions on the site https://dontkillmyapp.com/samsung to see if this helps?

Apparently, Samsung is now doing an even more aggressive power management that kills even foreground applications which might explain what you see.

I will check if I can figure anything else but also let me know if changing the settings helps at all.

lamrongol commented 2 years ago

@kelsos I set app setting "(Battery) Don’t optimize" and connection no longer drop for at least three days. Thank you very much.

kelsos commented 2 years ago

Great, good to know that this works for you. I need to add it to an FAQ somewhere now.