Android – detecting application launch from home or history

What about

    if((getIntent().getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY )!=0) {
        Log.d(TAG, "Called from history");
    }

?
This uses a simple Intent flag.

Leave a Comment