WebAPI/WebNFC: Difference between revisions

Line 191: Line 191:


== When to use the APIs  ==
== When to use the APIs  ==
1. Gaia applications, in order to read NDEF messages from a passive tag (or) P2P phone, should declare 'nfc-ndef-discovered' in their manifest file.This implies that the Gaia application shall be listed in activity picker whenever an NDEF message is about to be read. However, if the Gaia application wishes to perform write operation after reading, it can choose to do so by using the API 'writeNDEF()'. (provided user has picked the Nfc Application as his choice in the activity picker)
1. Gaia applications, in order to read NDEF messages from a passive tag (or) P2P phone, should declare 'nfc-ndef-discovered' in their manifest file.This implies that the Gaia application shall be listed in activity picker whenever an NDEF message is about to be read. However, if the Gaia application wishes to perform write operation after reading, it can choose to do so by using the API 'writeNDEF()'. (provided user has chosen the appropriate Nfc Application on the activity picker)


2. In order to write NDEF message (No need to declare 'nfc-ndef-discovered' in its manifest file)
2. In order to write NDEF message (No need to declare 'nfc-ndef-discovered' in the application's manifest file)


- In a P2P mode, Gaia applications shall register for 'onpeerready' as described above
- In a P2P mode, Gaia applications shall register for 'onpeerready' as described above
Confirmed users
118

edits