Code example for Intent

Methods: getDatagetFlags

     * @param intent The intent received in {@link #onNewIntent(Intent)} 
    private void setupDialUri(Intent intent) {
        // If the intent was relaunched from history, don't reapply the intent. 
        if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
        mDialUri = intent.getData();
    public void onBackPressed() { 
        if (isTaskRoot()) {
            // Instead of stopping, simply push this to the back of the stack. 
            // This is only done when running at the top of the stack; 
            // otherwise, we have been launched by someone else so need to 
            // allow the user to go back to the caller. 
        } else {