mclear / Android_NFC_Ring_Unlock

Issues and Wiki for the Android NFC Ring Unlock app
22 stars 7 forks source link

Add support for multiple NDEF records #54

Closed friode closed 10 years ago

friode commented 10 years ago

I'd like to be able to unlock my phone with an inlay that has multiple NDEF records, where the nfcringunlock/key MIME record is not the first record.

The first record is often used as the default by apps that don't support multiple NDEF records, and I'd like to use that record for a more sensible default (e.g. contact information or URL), whilst retaining the ability to unlock the phone with the same inlay.

Tested with http://ndefeditor.grundid.de/ and https://play.google.com/store/apps/details?id=com.antares.nfc

r2DoesInc commented 10 years ago

Not possible. The Android framework needs to know where to send the NFC event. If the mimetype is not available, another app will get the scan and the device will not unlock.

friode commented 10 years ago

You can't register to handle NDEF_DISCOVERED and read the individual NdefRecords in the NdefMessage to see if there's a match?

https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#dispatching https://developer.android.com/reference/android/nfc/NdefMessage.html

r2DoesInc commented 10 years ago

Weve had a bit of an internal discussion on this and have come to the conclusion that, while possible, there is not really a practical way to do this.

On Wed, Apr 30, 2014 at 5:21 PM, friode notifications@github.com wrote:

You can't register to handle NDEF_DISCOVERED and read the individual NdefRecords in the NdefMessage to see if there's a match?

https://developer.android.com/guide/topics/connectivity/nfc/nfc.html#dispatching https://developer.android.com/reference/android/nfc/NdefMessage.html

— Reply to this email directly or view it on GitHubhttps://github.com/mclear/Android_NFC_Ring_Unlock/issues/54#issuecomment-41852376 .

friode commented 10 years ago

Fair enough, this does reduce the utility of the ring somewhat, though. There's no way for me to use one ring to 1) unlock my phone, 2) unlock my front door, and 3) have a url or contact information available. And if I use the second inlay on a ring as a backup of the first, it limits it to only a single function.

JohnMcLear commented 10 years ago

Sure you can do all three just not a backup....

----- Reply message ----- From: "friode" notifications@github.com To: "mclear/Android_NFC_Ring_Unlock" Android_NFC_Ring_Unlock@noreply.github.com Subject: [Android_NFC_Ring_Unlock] Add support for multiple NDEF records (#54) Date: Wed, Apr 30, 2014 14:50

Fair enough, this does reduce the utility of the ring somewhat, though. There's no way for me to use one ring to 1) unlock my phone, 2) unlock my front door, and 3) have a url or contact information available. And if I use the second inlay on a ring as a backup of the first, it limits it to only a single function.

— Reply to this email directly or view it on GitHubhttps://github.com/mclear/Android_NFC_Ring_Unlock/issues/54#issuecomment-41855617.

friode commented 10 years ago

Sorry if I'm missing something obvious, but could you describe that scenario in a little more detail?