Quitting an app

edited May 2013 in General Discussion
Is there a way of quitting an app without having to go back through all activities first?

This is especially a problem with an app I am trying to build which has custom HTML pages - you have to go back through all visited pages, then through any activities before the app will quit.

Is there a way to add a quit option, and / or get the app to quit using a HTML link from a custom page ?
Tagged:

Comments

  • The user can press the app icon on the action bar to go directly back to your dashboard activity (unless you chose to turn off the dashboard by setting the dashboard type to "None").

    The user can always just press the dedicated Home button on their device to exit directly to the device's home screen.

  • Pressing the home button doesn't exit an app, it leaves it running in the background.

    The other suggestion you mentioned works though.   i.e. pressing the icon, then pressing the back button quits instead of taking the user back to whatever activity they were just using.

    Its not very obvious for the user though, but its something to work with.   thanks.

  • I think you are misunderstanding how the Android OS works. Android is designed to put apps to sleep in a kind of frozen state in the background. This is done to improve responsiveness and save battery life, as one of the most battery intensive parts of an app's life cycle is when it is being launched. Unless they're breaking the Android rules, the apps shown as being in the background are not stealing any resources from other apps, the OS is very smart about releasing things when it needs to.

    A properly designed app will respond to the life cycle event of being moved to the background by releasing everything it can, reducing its footprint to the bare minimum required to resume quickly.

    There's nothing wrong with doing work in the background when it's appropriate, though...if an app can anticipate the user and be ready in advance, it can really improve its responsiveness. App developers need to consider how important the app is to the user in order to know when this is appropriate behaviour. Similarly, some background operations like batching downloads or delaying them for the next anticipated wifi connection can be beneficial as well. Since Andromo can be used for such a wide variety of apps, it tends to err on the conservative side when it comes to such things (I don't think we do any work at all that isn't initiated by a foreground activity or service).

  • Thanks for the explanation, but I'm not misunderstanding at all.  Part of the app I created has radio streaming.   I want to be able to quit the app, and hence stop the streaming.   I know apps get "put to sleep" in the background, but the streaming does not stop when you send the app to the background.   

    The only way to stop it is by hitting the stop or pause buttons from the activity, hence me wanting a way to completely quit the app, to give the user an easier way to stop things.

    The ideal way for it to work would be the way TuneIn works, which is when it is in the background it leaves information in the notification area but also has a stop button you can click on direct from the notification area, which will stop the streaming and quit the app.

    The andromo app does have the notification are information, but no stop button.  You have to press to go back in to the app, and then press stop.




    Also I personally never just press the home button when I finish with an app, I always use any quit button or the back button to get out.  I'm not alone in this either.


  • edited May 2013
    Ah, so you don't really want to quit the app, you want to stop playback without needing to go back to the activity. Why didn't you just say that in the first place? :)

    Thanks for the suggestion, I would certainly like to add a stop button to the notification at some point in the future.

    I don't think having to reopen the app to press the stop button is difficult or confusing, though...especially given that the notification takes you right there. This follows the recommended Android behaviour, and was the standard Android audio player's behaviour until recent changes in 4.x.

    It's also not necessarily true that the user would want the audio to stop when they exit the app...it's not uncommon to listen to a radio stream while you're using another app.

    If you'd prefer your audio to end when the user exits the radio activity, one thing you could try is to use an Audio activity in Soundboard mode instead. It won't have any audio controls at the bottom, but will instead stop the audio as soon as the user exits the activity. The Audio activity will recognize a playlist if the URL ends with .m3u or .pls. However, it might not turn on the additional SHOUTcast support (such as fetching metadata about the track), but it could be worth trying if that's closer to what you're looking for.
  • BTW, there is no difference between using the Back button and the Home button to exit an app. The same process occurs behind the scenes, which is simply to call finish() on the activity. The app then enters a state where it is more likely to be recovered by the OS simply because it is no longer a foreground task.

    All that might change when you use the Back button is which activity you were in before you exit. This in turn will change which activity you return to the next time the system handles the launch intent for that app (since it returns you to the activity at the top of the stack).
  • Thanks I might give the soundboard idea a try and see what happens, because with the track info only appearing at the bottom line anyway instead of in the middle of the screen, I think it is missing something that may be a bit more user friendly.   (unless this is just the way it does it for icecast v2  only - I cant test it with shoutcast.)



Sign In or Register to comment.