android - NFC listener trigger based on tag -


i doing research on nfc , use, i've started simple proof of concept creating nfc application android. when tag scanned, sends rest request tag's id see whether registered service, , if is, content downloaded , played on phone.

the problem tags' id sequential, requirement have unique random information stored avoid possible complications , security issues. question is, should data be? there standard on subject?

the idea store x,y x trigger identifier , y random unique number. work? can custom activity started based on x value?

any , references appreciated. there cake.

you want check out page, describes latest dispatch process newly-detected tag: http://developer.android.com/reference/android/nfc/tag.html. makes difference if tag-detecting app expected running @ time tag scanned. if it's in foreground, can sure activity going first crack @ scanned tag, whatever tag detected. if app not running installed on device, intent filter(s) in androidmanifest.xml dictate whether or not app has chance @ being notified of detected tag. previously, tag data put extras of intent sent out. in 2.3.3, if there uri in tag's first ndef record, , tag uri or smartposter, uri gets put intent's data field, used when matching against intent filters. if tag mime_type tag, mime type put intent's type field. therefore, if use custom uri or custom mime type app looking for, should notified of tags (unless app in foreground , has requested tags).


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -