12-27-2011 05:43 PM
39 12
tools
  1. VickMackey#AC's Avatar
    Apps don't need to be 'kept alive' they just need to be gracefully tombstoned, or their state suspended.. whatever you want to call it. WP7 does a pretty good job of it for example. I don't know if Android has that ability or not.

    I always shake my head when people talk about 'multitasking' on Android anyway. It's pseudo multitasking just like the other major mobile OS's. True multitasking would keep YouTube playing in the background when I switched to type an email like it does on my Windows PC.... who wants that anyway? Nobody.

    Having the ability to keep certian threads running in the background like email gathering or music is the way to go. When I move out of Angry Birds (or whatever app you are talking about) take the app out of RAM and save it to disk. When I launch it again, resume that state. Easy peasy.
    Actually, I would prefer if youtube kept playing if i want to respond to a text real quick. why should it pause when memory is not an issue?
    12-27-2011 02:57 PM
  2. thebignewt's Avatar
    The average person doesn't want to keep track of any of this app stuff. So android does it for you automatically. Jeez, I remember the long threads about apps like Task Killer when android was new. It was useless then and it's still useless. I look at the "open apps" on my wife's iPhone and every one is "open" all the time. So I X them all out and nothing really changes. The iPhone doesn't have notification icons across the top to tell you GPS or BT are on either.
    12-27-2011 03:01 PM
  3. tk-093's Avatar
    Actually, I would prefer if youtube kept playing if i want to respond to a text real quick. why should it pause when memory is not an issue?
    Probably because if everything kept running full bore when not in the foreground our batteries would last about 30 minutes? Also the vast majority of smartphone owners are not as savy as a lot of us and they would hate it. But putting an option in there to let people kill their battery faster would be ok with me as long as it was off by default.
    12-27-2011 03:17 PM
  4. tk-093's Avatar
    The average person doesn't want to keep track of any of this app stuff. So android does it for you automatically. Jeez, I remember the long threads about apps like Task Killer when android was new. It was useless then and it's still useless. I look at the "open apps" on my wife's iPhone and every one is "open" all the time. So I X them all out and nothing really changes. The iPhone doesn't have notification icons across the top to tell you GPS or BT are on either.
    The differnence with iOS is that those apps are not running at all. They are in a suspended state so they are not having any impact on the processor and shouldn't effect battery life. There are some Android apps that can be running in the background full bore effecting battery life.

    Auto Task Killers are silly and not good because a lot of the times they close things that the device will just open right back up. However, i "bought" the Watchdog pro app when it was free for a day on Amazon and it used to alert me all the time on my Blunderbolt about the Engadget app sucking down all types of CPU while it was in the background. Those kind of apps are good to at least tell you what's going on.
    12-27-2011 03:28 PM
  5. Tust's Avatar
    But in my reference to slacker, it would be nice for me to not have to find my phone when I get in the car or if I forget to get my phone before I start driving I have to dig in my pocket, unlock it with a pin and start slacker while driving.
    I realize this doesn't address your point directly, but you can get a program like Llama, a profile app. You can tell it to automatically open slacker radio when it detects your car Bluetooth signal.
    12-27-2011 03:48 PM
  6. jlongjr27's Avatar
    So what it sounds like to me is maybe the developers of the apps that act the way they do are not programming the app correctly causing them to completely close and not save the current state when android closes them.

    I wonder if there is documentation on how this process is supposed to work and how you program this into apps. If there were it would be easier to pass this info to the developers of these apps to get it fixed.

    I realize this doesn't address your point directly, but you can get a program like Llama, a profile app. You can tell it to automatically open slacker radio when it detects your car Bluetooth signal.
    Sweet app. Thanks for sharing this with me. This takes care of half the problem I have with multitasking or lack thereof.
    12-27-2011 04:05 PM
  7. jlongjr27's Avatar
    Hum, found this here, Tasks and Back Stack | Android Developers

    When the system stops one of your activities (such as when a new activity starts or the task moves to the background), the system might destroy that activity completely if it needs to recover system memory. When this happens, information about the activity state is lost. If this happens, the system still knows that the activity has a place in the back stack, but when the activity is brought to the top of the stack the system must recreate it (rather than resume it). In order to avoid losing the user's work, you should proactively retain it by implementing the onSaveInstanceState() callback methods in your activity.

    I'm really starting to think that the app devs are just doing a crappy job

    IMO, it would still be nice to have the option to flag apps that I want to keep running. It could be a simple check box on the app that you could access in the app settings. The default could be off and the android os developers could limit the ability to flag more than a few apps based on total ram installed on the phone.
    ohiomoto likes this.
    12-27-2011 04:16 PM
  8. tk-093's Avatar
    IMO, it would still be nice to have the option to flag apps that I want to keep running. It could be a simple check box on the app that you could access in the app settings. The default could be off and the android os developers could limit the ability to flag more than a few apps based on total ram installed on the phone.
    That is an option, the developers just have to put it in their apps. Good Mobile Messaging has this feature for example. You can enable 'Persistent Mode' and that will not allow the OS to kill the app if it needs more memory.
    12-27-2011 04:29 PM
  9. jlongjr27's Avatar
    That is an option, the developers just have to put it in their apps. Good Mobile Messaging has this feature for example. You can enable 'Persistent Mode' and that will not allow the OS to kill the app if it needs more memory.
    Where is this set in the app? I wonder if I could just edit the app settings manually to add this.

    http://developer.android.com/referen...tml#persistent

    public static final int persistent
    Since: API Level 1

    Flag to control special persistent mode of an application. This should not normally be used by applications; it requires that the system keep your application running at all times.

    Must be a boolean value, either "true" or "false".

    This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.
    Constant Value: 16842765 (0x0101000d)
    12-27-2011 04:45 PM
  10. tk-093's Avatar
    I dunno, I'm not a developer... I assume it has to be done with each application. We use Good Messaging were I work which is why I used that example. Those developers put that option inside of the application settings after users were complaining that they were not getting email because the smarphone kept killing the application to free up memory.


    Where is this set in the app? I wonder if I could just edit the app settings manually to add this.

    R.attr | Android Developers

    public static final int persistent
    Since: API Level 1

    Flag to control special persistent mode of an application. This should not normally be used by applications; it requires that the system keep your application running at all times.

    Must be a boolean value, either "true" or "false".

    This may also be a reference to a resource (in the form "@[package:]type:name") or theme attribute (in the form "?[package:][type:]name") containing a value of this type.
    Constant Value: 16842765 (0x0101000d)
    12-27-2011 04:53 PM
  11. jlongjr27's Avatar
    Interestingly the app that Tust recommended, Llama has a "Force Persistent" option and after looking at go launcher it too has a "System persistent" check box option.
    12-27-2011 04:56 PM
  12. tk-093's Avatar
    Interestingly the app that Tust recommended, Llama has a "Force Persistent" option and after looking at go launcher it too has a "System persistent" check box option.
    When you turn those on, there should be a icon up at the top of the device that won't go away.. that is an Android requirement so you know there are apps that can not be killed.
    12-27-2011 05:02 PM
  13. CynicX's Avatar
    So what it sounds like to me is maybe the developers of the apps that act the way they do are not programming the app correctly causing them to completely close and not save the current state when android closes them.

    I wonder if there is documentation on how this process is supposed to work and how you program this into apps. If there were it would be easier to pass this info to the developers of these apps to get it fixed.



    Sweet app. Thanks for sharing this with me. This takes care of half the problem I have with multitasking or lack thereof.
    The problem I believe is more the way the os is dealing with memory. Because the browser for example....it is in a saved state so when you click back the page you were on is there but it killed the app so the page needs to be reloaded. So anything you've done on that page is lost.

    I'm on my xoom in browser and if I were to play angry birds according to this thread everything I'm typing now would be lost.

    I can make honeycomb do this but it takes alot more then angry birds. And since the gnex is a more powerful device (at least on paper and in benchmarks) it should have no problem doing what I can do.

    That's why I think its more of an OS thing....
    12-27-2011 05:07 PM
  14. jlongjr27's Avatar
    The problem I believe is more the way the os is dealing with memory. Because the browser for example....it is in a saved state so when you click back the page you were on is there but it killed the app so the page needs to be reloaded. So anything you've done on that page is lost.

    I'm on my xoom in browser and if I were to play angry birds according to this thread everything I'm typing now would be lost.

    I can make honeycomb do this but it takes alot more then angry birds. And since the gnex is a more powerful device (at least on paper and in benchmarks) it should have no problem doing what I can do.

    That's why I think its more of an OS thing....
    You may be right.

    Earlier I posted this:

    Open the phone settings, apps, and click on running. Open Angry Birds. press the app switcher button and go back to running apps. See Angry Birds listed? I don't. Where is it? Did it get swapped to the "SDD" for lack of a better term? For a split second I see 135 MB free then it jumps back to 222 mb free. Press the app switcher button and go back to Angry Birds. It's still running! Switch back to running apps. 144mb free, jumps to 225mb free, no sign of angry birds running.

    Well I found where it is running. If you launch Angry Birds and quickly switch to the running apps list while it's loading you can see it flash and go away. Something else I just noticed is the "SHOW CACHED PROCESSES" link at the bottom of the running apps tab. If you click that you will see "Angry Birds". Now start to multitask and go back to the cached processes list and angry birds disappears.

    Now my question is, and I can't find any documentation on it here The Developer's Guide | Android Developers, what exactly is a cached process? More importantly is it a process that was moved from ram to storage? If it's not in memory why is the cached process terminated so quickly?
    12-27-2011 05:43 PM
39 12

Tags for this Thread

LINK TO POST COPIED TO CLIPBOARD