Code example for NfcAdapter

Methods: setNdefPushMessageCallback, setOnNdefPushCompleteCallback

0
	@Override 
	public void onCreate(final Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
 
		nfcAdapter = NfcAdapter.getDefaultAdapter(this);
		nfcAdapter.setNdefPushMessageCallback(this,this);
		nfcAdapter.setOnNdefPushCompleteCallback(this,this);
 
		beamHandler = new BeamHandler(getApplicationContext());
	} 
 
	@Override 
	public void onNewIntent(final Intent intent) {
		// onResume gets called after this to handle the intent 
		setIntent(intent);
	} 
 
	@Override 
	public void onResume() { 
		super.onResume(); 
		if (NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction())) {