R-a-dio / Android-app

Android App for R/a/dio - Still in heavy development!
http://r-a-d.io
26 stars 12 forks source link

App Won't Close #13

Closed schmitticus closed 11 years ago

schmitticus commented 11 years ago

The app continues to run in the background after going home while paused. There may be something in settings but either they aren't implemented yet or they aren't opening for me. I can't even close it with advanced task killer. screenshot_2013-06-29-10-32-18 1 App is running in background(currently paused in that screenshot) but there is not task to kill. Not sure if this is my phone(Samsung Galaxy Stellar), the app, or advanced task killer.

Autumn commented 11 years ago

Fairly certain this is expected behaviour. At the moment, pausing the stream just pauses playing, it doesn't stop the services. I'll work on putting in a dedicated "Stop completely" button or option.

btw, you should be able to Force Stop it from the standard App settings.

ameliaikeda commented 11 years ago

Indeed, the standard task manager (Hold the home button) will force-kill this fine.

resttime commented 11 years ago

You should be able to close the app by pressing back, not the home button. I have a Samsung epic (google a picture) and I press the third button to close the app. It is an arrow facing backwards.

Guy-kun commented 11 years ago

Having the app still run (suspended) is completely normal of Android lifecycle (as long as music/the service are stopped appropriately) Task-killers are just a paranoia.

On Sun, Jun 30, 2013 at 9:11 PM, resttime notifications@github.com wrote:

You should be able to close the app by pressing back, not the home button. I have a Samsung epic (google a picture) and I press the third button to close the app. It is an arrow facing backwards.

— Reply to this email directly or view it on GitHubhttps://github.com/R-a-dio/Android-app/issues/13#issuecomment-20254464 .

Guy-kun commented 11 years ago

Pressing back ending the service but home not while audio is stopped does seem a bit weird though. Would probably be best to stop the service when the app is sent to the background regardless of method and not playing music.

resttime commented 11 years ago

Should be simple to implement through the activity's Override methods that is either onStop() or onPause(). A simple check if the mediaplayer is playing, then taking action.

Though I'm not sure if that is weird, I can think of situations where a user might want the service running despite music not playing.

I'm under the impression that the function of the Home button puts the activity in background whereas Back button destroys the activity. So the user gets the option of closing completely or just minimizing.

Guy-kun commented 11 years ago

'Typical' Android users are pretty oblivious to the use of back vs home and their intended purposes and they are often interchangeable. To suit this the best option is probably have neither end anything, but to have a context menu option to 'exit'. Users love this but it isn't true android (Looks horrible putting this stuff on the actionbar when there's no soft-key too)

To be completely in-line with ideologies both should really have the same purpose, however one returns to the previous activity on the stack and one returns to the launcher. To follow this, both back and home should end the service like previously said if not playing. (The case of wanting a notification but no audio is very very fringe case is it not?. There's no ongoing task you're notifying of either really)

I think one of these two is the lesser evil, think of the users or think of the ideology. (Sorry for the ramble, I love ranting about android lifecycle and users wanting apps 'killed')

Bevinsky commented 11 years ago

My 2 cents: If I wanted to quit the app and stop the music, I'd press the Back button. If I wanted to keep the music playing, I'd press the Home button. It might not be how everyone would use it, but that's just how I would intuitively understand the control scheme.

ameliaikeda commented 11 years ago

In android, "home" is suspend while back is close, but this is often inconsistent. I'd just make the back button keep playing, like XiiaLive does, and then explicitly stop the music via either widget or the play button (either in the notifications bar or the app itself)

Guy-kun commented 11 years ago

@HirotoKun The issue that still remains is whether the service/notification should ever remain while music is paused.

I propose as follow, please comment with issues regarding any of the behaviours:

This way there's no ambiguity with how to end the app. The notification/service represents ongoing playback of audio and it's presence reflects that (the only exception being it remaining running while the activity is in foreground to keep api data updated)

ameliaikeda commented 11 years ago

Hmm. I'd make this a setting in the options, but I'd keep the notification service only for high-priority messages when music is stopped. Probably a level like this:

DJ_CHANGE = 3;
FAVE_PLAYING =  2;
NEWS_POST = 1;
NOW_PLAYING = 0;
DEFAULT = userSettings; // default 3
Guy-kun commented 11 years ago

The problem is that in order to have the service running reliably to serve notifications, a sticky ongoing notification needs to be shown.

This seems kind of redundant to keep just for such updates. Maybe it could be a later settings feature as you say.

Guy-kun commented 11 years ago

Be wary of feature creep!

Guy-kun commented 11 years ago

Closing as current app lifecycle seems sufficient, #42 still needs resolving though.