I'm tasked with supporting an app that has already been deployed in production but improperly supports the destruction and recreation of Activities. This is most obvious when a user's device is configured by default to always destroy activities that aren't in the foreground.

This app doesn't explicitly set a value; it uses whatever the global default is.

My question is this: what are the common cases in which this setting is going to be enabled? For instance:

  1. Device manufacturer customizes Android such that this setting can be toggled from within the default device settings activity.

  2. Custom Android build (e.g. Cyanogen) has been configured to have it "on" by default.

  3. User downloads some sort of "power tool" allowing him to tweak the default system settings.

How likely are each of these? Are there other common cases I've missed?

有帮助吗?

解决方案

Device manufacturer customizes Android such that this setting can be toggled from within the default device settings activity.

There is no customization needed. This is available in the Developer Options area.

Custom Android build (e.g. Cyanogen) has been configured to have it "on" by default.

One hopes that nobody does this.

User downloads some sort of "power tool" allowing him to tweak the default system settings.

Again, this is part of Android, so no "power tool" is needed.

How likely are each of these?

Not very. I'd be surprised if it is more than one device in 10,000. If your app cannot handle this setting (and I suspect that few apps do), and you are worried about it, feel free to check the setting and display something to the user to have them go revert the setting.

其他提示

ALmost all devices have it in the settings these days- all nexus devices and high end Samsung devices. The user doesn't need a power tool to turn it on in any of those devices.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top