Yubico/yubioath-android — pull request #3 by growse (2013-11-22 23:42:45+00:00)
Title: Added NFC intent to go straight to app

One more PR from me. I thought it would be useful to go straight to the ListCodes part of the app when the YubiKey NFC intent fires. I'm not an android dev, so this code is entirely non-optimal, but it at least seems to work on my limited set of hardware.

The AndroidManifest.xml now has a filter which listens for a YubiKey neo NDEF_DISCOVERED which should load the main activity. Then, there's some code in onResume which checks the intent, and if it's NDEF_DISCOVERED runs almost the same code again as what's in onIntent. The main difference is that if the password is required, I couldn't figure out how to display the password window - getFragmentManager() seems to return null. I just show a toast instead.

So there's some duplication that's largely unnecessary. Hopefully a useful starting point for what might be quite a useful feature.