<div data-role="header" id="header-start">
<h1>Contacts exchanger</h1>
</div>
- <div data-role="content" id="content-start">loading</div>
+ <div data-role="content" id="content-start"></div>
<div id="contact-nfc-error" data-role="popup" class="center_title_1btn">
<div class="ui-popup-title"><h1>Warning</h1></div>
<div class="ui-popup-text">
* @returns {undefined}
*/
onPowerOn: function nfc_onPowerOn() {
+ console.log('Power On succeeded.');
this.app.started = true;
this.app.ui.loadStartPage();
},
*/
onPowerOnFails: function nfc_onPowerOnFails(err) {
console.error('Power On error: ' + err.message);
+ this.app.ui.showPopupWarning();
},
/**
},
startNFC: function nfc_startNFC() {
-
try {
this.nfcAdapter = tizen.nfc.getDefaultAdapter();
-
if (this.nfcAdapter.powered) {
this.nfcStateMemory = true;
this.onPowerOn();
return;
}
-
this.nfcStateMemory = false;
+ console.log('Turning NFC adapter On...');
this.nfcAdapter.setPowered(true, this.onPowerOn.bind(this), this.onPowerOnFails.bind(this));
} catch (e) {
console.error('startNFC problem', e);
this.nfcTarget.unsetReceiveNDEFListener();
this.nfcTarget = null;
} else {
- console.warn("app.nfc.nfcTarget not set");
+ //console.warn("app.nfc.nfcTarget not set");
}
} catch (error) {
console.error('error: ' + error.message);