Hallo Kev,

I wouldn't call that odd behavior but rather an exact match what you
have written in your code.
NfcAdapter.ACTION_NDEF_DISCOVERED.equals(getIntent().getAction()) will
not return true if the intent received from getIntent() does not
contain that action.

So if your app is started for the first time by the NDEF_DISCOVERED
intent, the condition will be true. Then you use setIntent(new
Intent()). So the next call to getIntent() will return that new
(empty) intent.

Now you send your app into the background by pressing the home key.
Note that the activity is still paused in background. When the app is
triggered by a new NDEF_DISCOVERED intent, onResume() is called on the
existing activity. Therefore, getIntent() will still return the intent
you set with setIntent(...).

br,
Michael

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to