Do not engage in activities - for what?

The name is pretty clear. I understand what this developer option does.

What I do not understand is the following:

  • Why was this option introduced in the first place?
  • After all the changes that have been created over the years, is it still useful?

I want to know the reasons for this option.

+21
android android-activity
Mar 14 '14 at 9:26
source share
2 answers

I believe this is a function used for debugging.

From Titanium Document :

Do not perform actions in the Developer Options menu. When this option is enabled, the Android OS will destroy the action as soon as it is stopped. It aims to help developers debug their applications. For example, it can simulate a case where Android kills an action in the background due to memory pressure. Under normal use, it is not recommended to enable this option, as this can lead to unexpected problems in applications, such as freezes, forced shutdown and reboot.

It seems like basically it helps deterministically test how your application works when the OS disables it for some reason (out of memory, etc.).

So that answered point 1. Point 2: Yes, I think :)

EDIT: further links

+21
Mar 14 '14 at 10:26
source share

The Android framework can destroy your activity at any time in the background or in the background, and you must write your actions so that they work correctly when this happens. What this entails depends on what the activity does, but usually involves implementing onSaveInstanceState(...) and restoring any previous state to onCreate(...) .

The Do Not Save Actions developer option simply changes the behavior of the structure, so it will always destroy your activity when it is directed to the background or back. This allows you to check how your activity reacts to what is usually a rare occurrence.

The link provided in another answer states:

Under normal use, it is not recommended to enable this feature, as this can lead to unexpected application problems, such as freezes, forced shutdown and reboot.

This is not true. If your actions are spelled correctly, the only effect of enabling "do not continue activity" should be (possibly) a slightly higher battery and processor consumption from constant savings and restoration of a constant state. Any applications that exhibit "unexpected problems" or are forced to close when this option is enabled should be fixed. As a developer, I usually leave “not doing business” all the time. I have seen many buggy applications, even some from Google. But this never led to a reboot, and I don't think it is possible.

+8
Sep 06 '15 at 20:15
source share



All Articles