Code example for ActionBarActivity

Methods: getIntent, onResume

0
        return msg;
    } 
 
    @Override 
    public void onResume() { 
        super.onResume(); 
        // Check to see that the Activity started due to an Android Beam 
        if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {
            processIntent(getIntent()); 
        } 
    } 
 
    @Override 
    public void onNewIntent(Intent intent) {
        // onResume gets called after this to handle the intent 
        setIntent(intent);
    } 
 
    /** 
     * Parses the NDEF Message from the intent and prints to the TextView 
     */