jellyfin-archive / jellyfin-android-original

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
271 stars 65 forks source link

Not closing app #291

Open dga4130-renato opened 4 years ago

dga4130-renato commented 4 years ago

really strange, with the back button the app does not close. just the middle button will send it to back but the app is still running in the backgroud sending and receiving packets. can this be solved ? I am asking this because i have an auto wake on lan script listening on port 8096 but the phone is sending packets even if the app is not in use. And anyway that is a battery consumation for nothing thanks.

dkanada commented 4 years ago

@dmitrylyzo I think you recently implemented a method to handle this issue?

dmitrylyzo commented 4 years ago

It depends on how back is implemented.

If back works as key then: if you push back on home screen and app has "exit" feature it should perform "exit" procedure. https://github.com/jellyfin/jellyfin-web/blob/41896e126ae0e29383408d0aa159fce0aaf5126f/src/scripts/inputManager.js#L106-L111 https://github.com/jellyfin/jellyfin-web/blob/41896e126ae0e29383408d0aa159fce0aaf5126f/src/components/apphost.js#L362-L368 https://github.com/jellyfin/jellyfin-web/blob/41896e126ae0e29383408d0aa159fce0aaf5126f/src/components/apphost.js#L305-L319

But I afraid that back on Android may work just as history.back() like in browsers.

dga4130-renato commented 4 years ago

yes true. back is history back but maybe from the main screen back could be exit instead . Exit the app but opening again takes you back to main screen without using credentials again

dmitrylyzo commented 4 years ago

I run 0.9.9 version of app on emulator. visually When you push back it does history.back() -> index.html (I think) then it redirects to #!/home.

dga4130-renato commented 4 years ago

Yes it's back,back,back untill you are at the home page , then you cant close it. Must consider the fact that the first time you open the app it's asking to disable the battery optimization so the app will not close and doesn't have optimization also. = battery drain.