Code example for Intent

Methods: getParcelableExtraputExtraputExtras

0
         
        switch (requestCode) {
             
            case REQUEST_CREATE_SHORTCUT:
                if (data != null) {
                    finish((Intent) data.getParcelableExtra(Intent.EXTRA_SHORTCUT_INTENT),
                            data.getStringExtra(Intent.EXTRA_SHORTCUT_NAME));
                } 
                break; 
                 
            default: 
                super.onActivityResult(requestCode, resultCode, data);
                break; 
        } 
    } 
     
    /** 
     * Finishes the activity and returns the given data. 
     */ 
    private void finish(Intent intent, String title) {
        // Give back what was given to us (it will have the shortcut, for example) 
        intent.putExtras(getIntent());
        // Put our information 
        intent.putExtra(EXTRA_TITLE, title);
        setResult(RESULT_OK, intent);
        finish();
    } 
 
    /**