I Found some codes for quit an Android application programatically. By calling any one of the following code in onDestroy() will it quit application entirely?
You can use finishAndRemoveTask () from API 21
finishAndRemoveTask ()
public void finishAndRemoveTask () Finishes all activities in this task and removes it from the recent tasks list.
public void finishAndRemoveTask ()
Finishes all activities in this task and removes it from the recent tasks list.