Android Programming and Technical Programming Technical

Can a user save all database updates in onStop ()?

Options
1) Yes, a user can save all database updates in onStop()
2) No, a user can save in onSavedInstance
3) No, a user can save in a Bundle
4) No, In some situations, a user can't reach onStop()

Read Solution (Total 2)

Android Other Question

What does the flag FLAG_ACTIVITY_SINGLE_INSTANCE do here?

Intent i = new Intent();
i.setAction("com.android.MYACTION");
i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_INSTANCE);
startActivity(i);

Options
1) It will start a new activity with matching intent filter, in a new task always.
2) It will start a new activity with matching intent filter, in a new task only if that corresponding task is not in memory now.
3) It will start a new activity with matching intent filter, in old task always. here old task means task in which the current activity is running which has started new activity.
4) This will start new activity in a new task, where only this activity will be there in that task and no other components. if at all new components are launched from this new activity, they will be launched in a different task.
On which thread broadcast receivers will work in android?

Options
1) Worker Thread
2) Main Thread
3) Activity Thread
4) None of the Above