Code example for Intent

Methods: getDatagetFlags

0
     * 
     * @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) {
            return; 
        } 
        mDialUri = intent.getData();
    } 
 
    @Override 
    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. 
            moveTaskToBack(false);
        } else { 
            super.onBackPressed();