Changes

Jump to: navigation, search

WebAPI/WebNFC

195 bytes added, 22:30, 18 March 2014
Sending/Writing NDEF messages
== Sending/Writing NDEF messages ==
In P2P mode, there are two event listeners that can be registered by the applications. Applications should have 'nfc-write' permissions in order to register for 'onpeerready' and 'onpeerlost'.
'''1. onpeerready''' : Fired when there is another nfc peer phone is close proximity (in its near-field) and if the registered Nfc application is top-most (visible) application.
Ex:- ''var nfcdom = window.navigator.mozNfc;
nfcdom.onpeerready = function(event) {
.// perform write ndef operation
.
}''
''Ex:- var nfcdom = window.navigator.mozNfc;
nfcdom.onpeerlost = function(event) {
// If necessary, show an UI indication that device is lost.
.
}''
Confirm
118
edits

Navigation menu