Reputation: 11642
I have the activity which is called after the end of the call (Hangup). See image below:
Problem is that on some devices (especially LG) i'm able to call activity back from background -> See image below:
I would like to ask, how can i deny to this behaviour?
I tried to do with some flags if activity is started form service, but it does not work.
I think that best solution could be completely end of the activity and erase this activity from history so cannot be launched again by user.
I tried to do it by this way:
public void closeApp() {
this.finish();
}
But this is working only on some devices.
Could somebody tell to me how can i solve it?
Many Thanks for any help.
Upvotes: 1
Views: 37
Reputation: 5020
You can try to use android:excludeFromRecents
for it at your AndroidManifest.xml
.
From doc
Whether or not the task initiated by this activity should be excluded from the list of recently used applications, the overview screen. That is, when this activity is the root activity of a new task, this attribute determines whether the task should not appear in the list of recent apps. Set "true" if the task should be excluded from the list; set "false" if it should be included. The default value is "false".
Upvotes: 1