From 16b6751e1ef6bad86aa26b7b14e7e95305656877 Mon Sep 17 00:00:00 2001 From: HyungKyu Song Date: Fri, 15 Feb 2013 15:11:53 +0900 Subject: [PATCH] Tizen 2.0 Release --- AUTHORS | 6 + LICENSE.Flora | 206 +++++++++++++++++++++++++ NOTICE | 4 + config.xml | 38 +++++ css/style.css | 94 +++++++++++ icon.png | Bin 0 -> 17581 bytes index.html | 63 ++++++++ js/app.js | 134 ++++++++++++++++ js/app.nfc.card.js | 94 +++++++++++ js/app.nfc.js | 190 +++++++++++++++++++++++ js/app.nfc.peer.js | 69 +++++++++ js/app.ui.js | 340 ++++++++++++++++++++++++++++++++++++++++ js/device_to_device.js | 62 ++++++++ js/main.js | 412 +++++++++++++++++++++++++++++++++++++++++++++++++ js/nfc_common.js | 174 +++++++++++++++++++++ js/read_from_card.js | 58 +++++++ js/write_to_card.js | 66 ++++++++ signature1.xml | 92 +++++++++++ 18 files changed, 2102 insertions(+) create mode 100644 AUTHORS create mode 100644 LICENSE.Flora create mode 100644 NOTICE create mode 100644 config.xml create mode 100644 css/style.css create mode 100755 icon.png create mode 100644 index.html create mode 100644 js/app.js create mode 100644 js/app.nfc.card.js create mode 100644 js/app.nfc.js create mode 100644 js/app.nfc.peer.js create mode 100644 js/app.ui.js create mode 100644 js/device_to_device.js create mode 100644 js/main.js create mode 100644 js/nfc_common.js create mode 100644 js/read_from_card.js create mode 100644 js/write_to_card.js create mode 100755 signature1.xml diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..e7736a8 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,6 @@ +Dariusz Paziewski +Pawel Sierszen +Tomasz Lukawski +Piotr Wronski +Piotr Szydelko +Tomasz Paciorek diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100644 index 0000000..9c95663 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.0, May, 2012 + +http://floralicense.org/license/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and +all other entities that control, are controlled by, or are +under common control with that entity. For the purposes of +this definition, "control" means (i) the power, direct or indirect, +to cause the direction or management of such entity, +whether by contract or otherwise, or (ii) ownership of fifty percent (50%) +or more of the outstanding shares, or (iii) beneficial ownership of +such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, +made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided +in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, +that is based on (or derived from) the Work and for which the editorial +revisions, annotations, elaborations, or other modifications represent, +as a whole, an original work of authorship. For the purposes of this License, +Derivative Works shall not include works that remain separable from, +or merely link (or bind by name) to the interfaces of, the Work and +Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original +version of the Work and any modifications or additions to that Work or +Derivative Works thereof, that is intentionally submitted to Licensor +for inclusion in the Work by the copyright owner or by an individual or +Legal Entity authorized to submit on behalf of the copyright owner. +For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or +its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue +tracking systems that are managed by, or on behalf of, the Licensor +for the purpose of discussing and improving the Work, but excluding +communication that is conspicuously marked or otherwise designated +in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Compatibility Definition Document +and passes the Compatibility Test Suite as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work +solely as incorporated into a Tizen Certified Platform, where such +license applies only to those patent claims licensable by such +Contributor that are necessarily infringed by their Contribution(s) +alone or by combination of their Contribution(s) with the Work solely +as incorporated into a Tizen Certified Platform to which such +Contribution(s) was submitted. If You institute patent litigation +against any entity (including a cross-claim or counterclaim +in a lawsuit) alleging that the Work or a Contribution incorporated +within the Work constitutes direct or contributory patent infringement, +then any patent licenses granted to You under this License for that +Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. You must retain, in the Source form of any Derivative Works that + You distribute, all copyright, patent, trademark, and attribution + notices from the Source form of the Work, excluding those notices + that do not pertain to any part of the Derivative Works; and + 4. If the Work includes a "NOTICE" text file as part of its distribution, + then any Derivative Works that You distribute must include a readable + copy of the attribution notices contained within such NOTICE file, + excluding those notices that do not pertain to any part of + the Derivative Works, in at least one of the following places: + within a NOTICE text file distributed as part of the Derivative Works; + within the Source form or documentation, if provided along with the + Derivative Works; or, within a display generated by the Derivative Works, + if and wherever such third-party notices normally appear. + The contents of the NOTICE file are for informational purposes only + and do not modify the License. + +You may add Your own attribution notices within Derivative Works +that You distribute, alongside or as an addendum to the NOTICE text +from the Work, provided that such additional attribution notices +cannot be construed as modifying the License. You may add Your own +copyright statement to Your modifications and may provide additional or +different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works +as a whole, provided Your use, reproduction, and distribution of +the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Flora License to your work + +To apply the Flora License to your work, attach the following +boilerplate notice, with the fields enclosed by brackets "[]" +replaced with your own identifying information. (Don't include +the brackets!) The text should be enclosed in the appropriate +comment syntax for the file format. We also recommend that a +file or class name and description of purpose be included on the +same "printed page" as the copyright notice for easier +identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Flora License, Version 1.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..85044e4 --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1. +Please, see the LICENSE.Flora file for Flora License terms and conditions. + diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..97d8f85 --- /dev/null +++ b/config.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ContactsExchanger + + + + + + + + + + + + diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..5077089 --- /dev/null +++ b/css/style.css @@ -0,0 +1,94 @@ +.ui-btn-start { + margin: 0px auto; + margin-top: 10px; + padding: 40px 0px 0px 0px; + width: 90%; + height: 50px; + font-size: 16px; +} + +.defaultText { + font-size: 20px; + text-align: center; +} + +.comment { + font-size: 16px; + text-align: center; + line-height: 3px; + color: black; + padding: 0px; + margin: 0px 0px 12px 0px; +} + +#comment { + left: 0px; + margin: 0 auto; + right: 0px; + width: inherit; +} + +.box { + margin: 0px; + padding: 0px; + display: table-cell; + vertical-align: middle; + height: inherit; + width: inherit; +} + +.gap { + width: 100%; + height: 10px; +} + +#list-choose li a { + white-space: nowrap; + overflow: hidden !important; + text-overflow: ellipsis; + width: 60%; + float: left; +} + +#list-choose li .ui-li-text-sub { + white-space: nowrap; + overflow: hidden !important; + text-overflow: ellipsis; + width: 40%; +} + +#list-choose li.ui-btn-down-s a { + color: black; +} + +#comment-name { + white-space: nowrap; + overflow: hidden !important; + text-overflow: ellipsis; + width: 90%; + margin-left: 5%; + line-height: inherit; + font-size: 1rem; + font-weight: bold; +} + +#accept-choose { + width: auto; +} + +.defaultVeryBigText { + font-size: 30px; + margin: 0px; + padding: 0px; + text-align: center; + line-height: 30px; +} + +.defaultCounterText { + margin-top: 10px; + margin-bottom: 10px; + font-size: 100px; + padding: 0px; + text-align: center; + line-height: 100px; +} \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100755 index 0000000000000000000000000000000000000000..983c883493a0ae561b9592d54ea8204042b4b6fb GIT binary patch literal 17581 zcmWh!1yCGI6g=ErgFA=2yL<2e!JP!R;O-JMxI=K4;O-JEK!D(SxV!%SRdZ|=vb!_$ zrr+!CN0iz}IW%MGn)_u zLRS4EC8efjQ%n4@*V{mUuKj5+*J#Fcwdp88sSt31OGAFfODhGJ5=Z z%cscpZ|D8~saqJr4fBf}U#us$G@QEF;WP-q4S zSN2Lr_>!px6T%3rR7Qhv8;yWWkUk=dGlGr|D;ao7fq)5@*A&_`Q=GNmE8_!a5I4r= z^=}X;KM@a@?e(kY6nf3n6mMKJx-rX95Bxionc2?U-gKptI0&@m=0E$!%+^R0CHoEnDM)BrUf$c?T~ZvB)Hfa1@q4rGH}2JW zwR`jze!0Kh?B1pc;xr7BgMHZS|9zueOfsE>6l%7*A20XPg7W@CI!86AVAiI~h`XbX z?Hnha8GFrHOcf=W#4tqr=iOp^gZUXobb|*}_f-_iCy}Mh&>ZGYi5^qet#|t#1iI>Q z?3)K8!UWocY)yN-pNqZ9<j{#e|_MSP~pQSx3rf!Zt5X%H6AO6Q1mZ&f2ftiZ0@W z@nnja+XwCpLV}eTMZ__s{1*vj7OhJihe(hS_CVPu4~rc`LopVKt4^hq$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IvrngjkO}@`y1wIQS%hUp6&0)x_iR%Vb&pv@FYi<%Qt9VEM6ZEic5!d;FbA zu*tHl*9(Qh3%hph+Tw)BEdchdx86!cSpRVi*#A+E`ncQj<;%yCkN_nbjRqPT8ctVL zb&(`V3nWRJNeDUlPj%FCgzcl0?y_xrvuT>^Mn*>7>FVklbO>WP+(ZA|-1EPNqdx9- z^UXK23KtuIxqSI@ZRgINZ=tv>w*)}0tgH;CQmHA5qD+!yc_JYsMF>d(2m** + + + + + + + Contacts-exchanger + + + + + + + + + + + + + + + +
+
+

Contacts-exchanger

+
+ +
+
+ +
+
+

Contacts list

+ Accept +
+ +
+ + +
+ +
+
+

+
+ +
+
+ +
+
+

Add contact

+ Save +
+ +
+ + +
+ + + diff --git a/js/app.js b/js/app.js new file mode 100644 index 0000000..1ca55d6 --- /dev/null +++ b/js/app.js @@ -0,0 +1,134 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint devel: true*/ +/*global $, tizen */ + +var App = null; + +// App instance +var app = null; + +(function () { // strict mode wrapper + 'use strict'; + + function checkCharsSize(string) { + var i, result = '', length = string.length; + for (i = 0; i < length; i += 1) { + if (string.charCodeAt(i) < 256) { + result += string[i]; + } + } + return result; + } + + /** + * Creates a new application object + * + * @class Application + */ + App = function App() {}; + + App.prototype = { + nfcAdapter: null, + addressBook: null, + started: false, + timeOutHandler: null, + nfc: null, + + init: function appInit() { + this.ui = new App.Ui(this); + this.nfc = new App.NFCControl(this); + + this.ui.disableSelections(); + this.ui.defineEvents(); + this.initAddressBook(); + this.nfc.startNFC(); + }, + + saveDefaultCard: function saveDefaultCard() { + var elementSelected = $('#list-choose li.selected'); + localStorage.started = true; + localStorage.id = elementSelected.attr('id'); + localStorage.firstName = elementSelected.attr('firstName'); + localStorage.lastName = elementSelected.attr('lastName'); + localStorage.phoneNumber = elementSelected.attr('phoneNumber'); + localStorage.vCard = elementSelected.attr('vCard'); + $.mobile.changePage('#start'); + }, + + initAddressBook: function initAddressBook() { + var addressBooksCB = function (addressbooks) { + if (addressbooks.length > 0) { + this.addressBook = addressbooks[0]; + } else { + console.error('initAddressBook failed'); + } + }, + errorCB = function (e) { + console.log('problem with getAddressBooks() method: ' + e.message); + }; + + try { + tizen.contact.getAddressBooks(addressBooksCB.bind(this), errorCB); + } catch (e) { + console.error('problem with getAddressBooks() method: ' + e.message); + } + }, + + countDown: function countDown(time, obj) { + obj.text(time); + if (time > 0) { + time -= 1; + this.timeOutHandler = setTimeout(function () { this.countDown(time, obj); }.bind(this), 1000); + } else { + this.nfc.timeExpired(); + } + }, + + saveContact: function saveContact() { + var phone, first, last, contactPage = $('#contact'), contact = null; + phone = contactPage.data('contactsData').phone; + first = contactPage.data('contactsData').first; + last = contactPage.data('contactsData').last; + + try { + contact = new tizen.Contact({name: new tizen.ContactName({firstName: first, lastName: last}), phoneNumbers: [new tizen.ContactPhoneNumber(phone)]}); + this.addressBook.add(contact); + this.app.ui.moveToStartPage('New contact added'); + } catch (err) { + this.app.ui.moveToStartPage('Problem with new contact adding'); + console.error('The following error occurred while adding: ' + err.name); + } + }, + + loadContacts: function loadContacts() { + var self = this, + errorCB = function (e) { + console.error('loadContacts() problem with find() method: ' + e.message); + }; + this.addressBook.find(function (contacts) { + self.ui.showContactsList(contacts); + }, errorCB); + } + + }; + +}()); + +app = new App(); + +$(document).ready(app.init.bind(app)); diff --git a/js/app.nfc.card.js b/js/app.nfc.card.js new file mode 100644 index 0000000..0ff91c7 --- /dev/null +++ b/js/app.nfc.card.js @@ -0,0 +1,94 @@ +/*jslint devel: true*/ +/*global $, tizen, App, app */ + +(function () { // strict mode wrapper + 'use strict'; + + App.NFCCard = function (nfcControl) { + this.app = nfcControl.app; + + }; + + App.NFCCard.prototype = { + + prepareForNFC: null, + + /* card read */ + + readMessageErr: function readMessageErr(e) { + app.nfc.timeExpired('Read error!'); + }, + + sucTagReadAttach: function sucTagReadAttach(tag) { + if (tag.isSupportedNDEF) { + tag.readNDEF(this.app.nfc.readMessage.bind(this.app.nfc), this.readMessageErr.bind(this)); + } else { + console.warn("This Tag doesn't support NDEF"); + } + }, + + setTagDetectRead: function setTagDetectRead() { + var suc = { onattach: this.sucTagReadAttach.bind(this), ondetach: this.app.nfc.sucDetach.bind(this.app.nfc) }; + try { + app.nfc.nfcAdapter.setTagListener(suc); + } catch (error) { + console.error('error: ' + error.message); + } + }, + + + /* card write */ + + sucSend: function sucSend() { + app.nfc.timeExpired('Send success!'); + }, + + errSend: function errSend(e) { + console.warn('errSend'); + app.nfc.timeExpired('Send problem! ' + e.message); + }, + + sucTagWriteAttach: function sucTagWriteAttach(tag) { + var newMessage = null, + separator = String.fromCharCode(30), + endOfText = String.fromCharCode(3), + fullContact = localStorage.phoneNumber + separator + localStorage.firstName + separator + localStorage.lastName, + prepareForNFC; + + prepareForNFC = this.prepareForNFC || function prepareForNFC(contact) { + if (contact.length > 31) { + contact = contact.substring(0, 31); + if (contact[29] !== separator) { + contact = contact.substring(0, 30) + endOfText; + } + } + return contact; + }; + + fullContact = prepareForNFC(fullContact); + + try { + newMessage = this.app.nfc.phoneNumber2NDEF(fullContact); + } catch (err) { + console.error("NDEFMessage problem: " + err.message); + } + + if (tag.isSupportedNDEF) { + tag.writeNDEF(newMessage, this.sucSend.bind(this), this.errSend.bind(this)); + } else { + console.warn("This Tag doesn't support NDEF"); + } + }, + + setTagDetectWrite: function setTagDetectWrite() { + var suc = { onattach: this.sucTagWriteAttach.bind(this), ondetach: this.app.nfc.sucDetach }; + try { + app.nfc.nfcAdapter.setTagListener(suc); + } catch (error) { + console.error('error: ' + error.message); + } + } + + }; + +}()); diff --git a/js/app.nfc.js b/js/app.nfc.js new file mode 100644 index 0000000..1a23436 --- /dev/null +++ b/js/app.nfc.js @@ -0,0 +1,190 @@ +/*jslint devel: true*/ +/*global $, tizen, App, app */ + +(function () { // strict mode wrapper + 'use strict'; + + App.NFCControl = function (app) { + this.app = app; + this.init(); + }; + + App.NFCControl.prototype = { + nfcTarget: null, + nfcStateMemory: false, + + init: function init() { + this.card = new App.NFCCard(this); + this.peer = new App.NFCPeer(this); + }, + + timeExpired: function timeExpired(monit) { + clearTimeout(this.app.timeOutHandler); + this.unsetTargetDetect(); + this.unsetTagDetect(); + this.app.ui.moveToStartPage(monit); + }, + + resolveContact: function resolveContact(contactsString) { + var separator = String.fromCharCode(30), + endOfText = String.fromCharCode(3), + contactsArray, + phone = '', + first = '', + last = '', + resolveData; + + contactsArray = contactsString.split(separator); + + resolveData = function (value) { + if (!value) { + return ''; + } + return value.replace(endOfText, '…'); + }; + + phone = resolveData(contactsArray[0]); + first = resolveData(contactsArray[1]); + last = resolveData(contactsArray[2]); + return {phone: phone, first: first, last: last}; + }, + + fillRecordInfo: function fillRecordInfo(record) { + try { + var contactsData = this.resolveContact(this.convertNDEF2phoneNumber(record.payload)); + this.app.ui.displayContact(contactsData); + } catch (error) { + console.error(error); + } + }, + + readMessage: function readMessage(message) { + try { + this.fillRecordInfo(message.records[0]); + } catch (e) { + console.error(e.message); + } + }, + + contact2NDEF: function contact2NDEF(contact) { + var t, a = [], i, newMessage = new tizen.NDEFMessage(); + if (typeof contact === 'string') { + t = contact; + } else { + t = contact.convertToString("VCARD_30"); + } + a.length = t.length; + for (i = 0; i < a.length; i += 1) { + a[i] = t.charCodeAt(i); + } + newMessage.records[0] = new tizen.NDEFRecordMedia('text/x-vcard', a); + return newMessage; + }, + + phoneNumber2NDEF: function phoneNumber2NDEF(contact) { + var phoneNumberArray = [], i, length = contact.length, newMessage = new tizen.NDEFMessage(); + for (i = 0; i < length; i += 1) { + phoneNumberArray.push(contact.charCodeAt(i)); + } + newMessage.records[0] = new tizen.NDEFRecordMedia('text/x-vcard', phoneNumberArray); + return newMessage; + }, + + convertNDEF2phoneNumber: function convertNDEF2phoneNumber(contact) { + var i, length = contact.length, phoneNumber = ''; + for (i = 0; i < length; i += 1) { + phoneNumber += String.fromCharCode(contact[i]); + } + return phoneNumber; + }, + + startNFC: function startNFC() { + var onPowerOn, onPowerOnFails; + + onPowerOn = function () { + app.started = true; + app.ui.loadStartPage(); + }; + onPowerOnFails = function (err) { + console.error('Power On error: ' + err.message); + }; + + try { + this.nfcAdapter = tizen.nfc.getDefaultAdapter(); + try { + if (this.nfcAdapter.powered) { + this.nfcStateMemory = true; + onPowerOn(); + } else { + this.nfcStateMemory = false; + this.nfcAdapter.setPowered(true, onPowerOn, onPowerOnFails); + } + } catch (err) { + console.error('setPowered(true) problem: ' + err.message); + } + } catch (e) { + console.error('getDefaultAdapter() method problem: ' + e.message); + } + }, + + stopNFC: function stopNFC() { + var onPowerOff, onPowerOffFails; + + onPowerOff = function () { + tizen.application.getCurrentApplication().exit(); + }; + + onPowerOffFails = function (err) { + console.error('Power Off error: ' + err.message); + tizen.application.getCurrentApplication().exit(); + }; + + try { + if (this.nfcStateMemory) { + onPowerOff(); + } else { + this.nfcAdapter.setPowered(false, onPowerOff, onPowerOffFails); + } + } catch (err) { + console.error('setPowered(false) problem: ' + err); + } + }, + + unsetTargetDetect: function unsetTargetDetect() { + try { + if (this.nfcTarget) { + this.nfcTarget.unsetReceiveNDEFListener(); + this.nfcTarget = null; + } else { + console.warn("app.nfc.nfcTarget not set"); + } + } catch (error) { + console.error('error: ' + error.message); + } + try { + this.nfcAdapter.unsetPeerListener(); + } catch (e) { + console.error('error: ' + e.message); + } + }, + + unsetTagDetect: function unsetTagDetect() { + try { + this.nfcAdapter.unsetTagListener(); + } catch (error) { + console.error('error: ' + error.message); + } + }, + + displayContact: function displayContact(obj) { + clearTimeout(this.app.timeOutHandler); + this.unsetTargetDetect(); + this.unsetTagDetect(); + this.app.ui.moveToContactPage(obj); + }, + + sucDetach: function sucDetach() { + } + }; + +}()); diff --git a/js/app.nfc.peer.js b/js/app.nfc.peer.js new file mode 100644 index 0000000..bff7abe --- /dev/null +++ b/js/app.nfc.peer.js @@ -0,0 +1,69 @@ +/*jslint devel: true*/ +/*global $, tizen, App, app */ + +(function () { // strict mode wrapper + 'use strict'; + + App.NFCPeer = function (nfcControl) { + this.app = nfcControl.app; + }; + + App.NFCPeer.prototype = { + + sucSendToTarget: function sucSendToTarget() { + }, + + errSendToTarget: function errSendToTarget(e) { + this.app.nfc.timeExpired('Send problem! ' + e.message); + }, + + errorMessage: function errorMessage(e) { + console.error('Target Receiving Error: ' + e.message); + }, + + setReceiveFromTarget: function setReceiveFromTarget() { + try { + if (this.app.nfc.nfcTarget) { + this.app.nfc.nfcTarget.setReceiveNDEFListener(this.app.nfc.readMessage.bind(this.app.nfc), this.errorMessage.bind(this)); + } else { + console.warn("app.nfc.nfcTarget not set"); + } + } catch (error) { + console.error('setReceiveFromTarget error: ' + error.message); + } + }, + + sucTargetAttach: function sucTargetAttach(target) { + var newMessage = null, + separator = String.fromCharCode(30), + fullContact = localStorage.phoneNumber + separator + localStorage.firstName + separator + localStorage.lastName; + this.app.nfc.nfcTarget = target; + this.setReceiveFromTarget(); + + try { + newMessage = this.app.nfc.phoneNumber2NDEF(fullContact); + } catch (err) { + console.error("NDEFMessage problem: " + err.message); + } + + try { + target.sendNDEF(newMessage, this.sucSendToTarget.bind(this), this.errSendToTarget.bind(this)); + } catch (e) { + console.error("NDEFMessage problem: " + e.message); + } + }, + + setTargetDetect: function setTargetDetect() { + var err = function (e) { + console.error('Target Listen Error: ' + e.message); + }, + suc = { onattach: this.sucTargetAttach.bind(this), ondetach: this.app.nfc.sucDetach.bind(this.app.nfc) }; + try { + app.nfc.nfcAdapter.setPeerListener(suc, err); + } catch (error) { + console.error('error: ' + error.message); + } + } + }; + +}()); diff --git a/js/app.ui.js b/js/app.ui.js new file mode 100644 index 0000000..8985e04 --- /dev/null +++ b/js/app.ui.js @@ -0,0 +1,340 @@ +/*jslint devel: true*/ +/*global $, tizen, App, app */ + +App.Ui = null; + +(function () { // strict mode wrapper + 'use strict'; + + var prepareCallerName = function prepareCallerName(contact) { + var callerName, firstName, lastName; + callerName = ''; + firstName = contact.name.firstName; + lastName = contact.name.lastName; + if (firstName !== '' && firstName !== null) { + callerName = firstName; + } + if (lastName !== '' && lastName !== null) { + if (callerName === '') { + callerName += lastName; + } else { + callerName += ' '; + callerName += lastName; + } + } + if (callerName === '') { + callerName = 'no name'; + } + return callerName; + }; + + App.Ui = function App_Ui(app) { + this.app = app; + }; + + App.Ui.prototype = { + popup: null, + + showPopup: function showPopup(message, page) { + this.popup = $(''); + this.page.append(this.popup); + this.page.trigger('create'); + this.popup.data('page', page); + this.popup.popupwindow('open'); + }, + + closePopup: function closePopup() { + var page = this.popup.data('page'); + page.data('monit', ''); + this.popup.popupwindow('close'); + this.popup.remove(); + this.popup = null; + }, + + disableAccept: function disableAccept() { + $('#accept-choose').css('pointer-events', 'none').addClass('ui-disabled'); + }, + + enableAccept: function enableAccept() { + $('#accept-choose').css('pointer-events', 'auto').removeClass('ui-disabled'); + }, + + createListRecord: function createListRecord(contacts) { + $.mobile.changePage('#choose'); + }, + + prepareWaitingPage: function prepareWaitingPage(title, text) { + var waitingBox, waitingContent, + contentTransfer = $('#content-transfer'); + waitingBox = $('
'); + waitingContent = $('

' + text + '

'); + $('#header-transfer H1').text(title); + contentTransfer.empty(); + waitingBox.append(waitingContent); + contentTransfer.append(waitingBox); + $('#content-start').trigger('create'); + + this.app.countDown(10, $('#counter')); + }, + + loadTemporaryContent: function loadTemporaryContent() { + var temporaryBox, temporaryContent, temporaryButton, contentStart; + + temporaryBox = $('
'); + temporaryContent = $('

Default card hasn\'t defined yet!
Do you want to define it now?

'); + temporaryButton = $('
Create default card
'); + contentStart = $('#content-start'); + + temporaryButton.on('tap', function (event) { + event.preventDefault(); + $.mobile.changePage('#choose'); + }); + + contentStart.empty(); + temporaryBox.append(temporaryContent).append(temporaryButton); + + contentStart.append(temporaryBox); + contentStart.trigger('create'); + }, + + loadStartContent: function loadStartContent() { + var startBox, contentStart, gap, comment, changeContact, readFromCard, writeToCard, communicateWithOtherDevice; + contentStart = $('#content-start'); + startBox = $('
'); + gap = $('
'); + comment = $('

Your default contact

' + (localStorage.firstName || '') + ' ' + (localStorage.lastName || '') + '

'); + changeContact = $('
Change your default contact
'); + changeContact.on('tap', function (event) { + event.preventDefault(); + $.mobile.changePage('#choose'); + }); + readFromCard = $('
Read from card
'); + readFromCard.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'read'); + $.mobile.changePage('#transfer'); + }); + writeToCard = $('
Write to card
'); + writeToCard.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'write'); + $.mobile.changePage('#transfer'); + }); + communicateWithOtherDevice = $('
Communicate with other device
'); + communicateWithOtherDevice.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'communicate'); + $.mobile.changePage('#transfer'); + }); + + contentStart.empty(); + startBox.append(changeContact).append(gap.clone()).append(readFromCard).append(gap.clone()).append(writeToCard).append(gap.clone()).append(communicateWithOtherDevice).prepend(comment); + + contentStart.append(startBox); + contentStart.trigger('create'); + }, + + loadStartPage: function loadStartPage() { + if (localStorage.started === undefined) { + + this.loadTemporaryContent(); + } else { + + this.loadStartContent(); + } + }, + + prepareContactsTemplate: function prepareContactsTemplate(phone, first, last) { + var ul; + + ul = $('
    '); + $('#contact > #content-contact > .ui-scrollview-view').empty().append(ul); + + ul.append($('
  • ' + ((first === '' || first === 'null') ? '...' : first) + 'First Name
  • ')); + ul.append($('
  • ' + ((last === '' || last === 'null') ? '...' : last) + 'Last Name
  • ')); + ul.append($('
  • ' + ((phone === '' || phone === 'null') ? '...' : phone) + 'Phone Number
  • ')); + + $('#contact > #content-contact').trigger('create'); + }, + + showContactsList: function showContactsList(contacts) { + var self = this, + ul = $('
      '), + listElementTap, + sortedContactList = [], + i, + j, + len, + length, + firstName = '', + lastName = '', + phoneNumber = '', + id, + vCard, + listElement; + + $('#choose > #content-choose > .ui-scrollview-view').empty().append(ul); + + listElementTap = function (event) { + event.preventDefault(); + + self.enableAccept(); + + $(this).parent().find('li').css('background-color', 'inherit').removeClass('selected'); + $(this).css('background-color', '#ccc').addClass('selected'); + }; + + for (i = 0, len = contacts.length; i < len; i += 1) { + firstName = ''; + lastName = ''; + phoneNumber = ''; + id = contacts[i].id; + vCard = contacts[i].convertToString('VCARD_30'); + if (contacts[i].name.firstName !== null) { + firstName = contacts[i].name.firstName; + } + if (contacts[i].name.lastName !== null) { + lastName = contacts[i].name.lastName; + } + if (contacts[i].phoneNumbers[0] !== undefined) { + phoneNumber = contacts[i].phoneNumbers[0].number; + } + sortedContactList.push({caller: prepareCallerName(contacts[i]), firstName: firstName, lastName: lastName, phoneNumber: phoneNumber, id: id, vCard: vCard, contact: contacts[i]}); + } + + sortedContactList.sort(function (a, b) { + if (a.caller < b.caller) { + return -1; + } + if (a.caller > b.caller) { + return 1; + } + return 0; + }); + + for (j = 0, length = sortedContactList.length; j < length; j += 1) { + listElement = $('
    • ' + sortedContactList[j].caller + '' + sortedContactList[j].phoneNumber + '
    • '); + if (localStorage.id === listElement.attr('id')) { + listElement.css('background-color', '#ccc'); + } + listElement.on('tap', listElementTap); + ul.append(listElement); + } + + $('#choose > #content-choose').trigger('create'); + }, + + moveToStartPage: function moveToStartPage(monit) { + $('#start').data('monit', monit || ''); + $.mobile.changePage('#start'); + }, + + moveToContactPage: function moveToContactPage(obj) { + $('#start').data('monit', ''); + $('#contact').data('contactsData', obj); + $.mobile.changePage('#contact'); + }, + + disableSelections: function disableSelections() { + $.mobile.tizen.disableSelection(document); + }, + + defineEvents: function defineEvents() { + var self = this; + + $('#header-start .ui-btn-back').on('tap', function (event) { + event.preventDefault(); + self.app.nfc.stopNFC(); + }); + + $('#footer-transfer').on('tap', '.ui-btn-back', function (event) { + event.preventDefault(); + self.app.nfc.timeExpired(); + }); + + $('#footer-contact').on('tap', '.ui-btn-back', function (event) { + event.preventDefault(); + $.mobile.changePage('#start'); + }); + + $('#choose').on('pagebeforeshow', function () { + self.disableAccept(); + }); + + $('#choose').on('pageshow', function (event) { + self.app.loadContacts(); + }); + + $('#contact').on('pageshow', function (event) { + var phone, first, last; + phone = $(this).data('contactsData').phone; + first = $(this).data('contactsData').first; + last = $(this).data('contactsData').last; + self.prepareContactsTemplate(phone, first, last); + }); + + $('#accept-choose').on('tap', function (event) { + event.preventDefault(); + self.app.saveDefaultCard(); + }); + + $('#save-contact').on('tap', function (event) { + event.preventDefault(); + self.app.saveContact(); + }); + + $('#start').on('pagebeforeshow', function () { + if (self.app.started) { + self.loadStartPage(); + } + }); + + $('#start').on('pageshow', function () { + var monit, obj, contentStart; + obj = $(this); + monit = obj.data('monit'); + if (monit !== '' && monit !== undefined) { + self.showPopup(obj.data('monit'), obj); + } + contentStart = $('#content-start'); + contentStart.css('height', contentStart.height() + 'px').css('width', contentStart.width() + 'px'); + }); + + $('#transfer').on('pageshow', function () { + var contentTransfer = $('#content-transfer'); + contentTransfer.css('width', contentTransfer.width() + 'px'); + setTimeout(function () { // workaround (setTimeout with 0 delay) + contentTransfer.css('height', contentTransfer.css('min-height')); + }, 0); + }); + + $('#transfer').on('pageshow', function () { + var option = $(this).data('option'); + if (option === 'read') { + self.prepareWaitingPage('Card to Device', 'PUT WIRELESS TAG
      CLOSE TO
      YOUR DEVICE'); + try { + self.app.nfc.card.setTagDetectRead(); + } catch (err) { + console.error(err.message); + } + } else if (option === 'write') { + self.prepareWaitingPage('Device to Card', 'PUT WIRELESS TAG
      CLOSE TO
      YOUR DEVICE'); + try { + self.app.nfc.card.setTagDetectWrite(); + } catch (er) { + console.error(er.message); + } + } else { + self.prepareWaitingPage('Device to Device', 'PUT YOUR DEVICE
      CLOSE TO
      OTHER DEVICE'); + try { + self.app.nfc.peer.setTargetDetect(); + } catch (e) { + console.error(e.message); + } + } + }); + } + + }; + +}()); diff --git a/js/device_to_device.js b/js/device_to_device.js new file mode 100644 index 0000000..e2bc9ab --- /dev/null +++ b/js/device_to_device.js @@ -0,0 +1,62 @@ +/*jslint devel: true*/ +/*global $, tizen, nfcAdapter, timeOutHandler, nfcTarget: true, sucDetach, timeExpired, readMessage, phoneNumber2NDEF */ + +var sucSendToTarget = function () { + "use strict"; + //timeExpired('Send success!'); +}; + +var errSendToTarget = function (e) { + "use strict"; + timeExpired('Send problem! ' + e.message); +}; + +var errorMessage = function (e) { + "use strict"; + console.log('Target Receiving Error: ' + e.message); +}; + +var setReceiveFromTarget = function () { + "use strict"; + try { + nfcTarget.setReceiveNDEFListener(readMessage, errorMessage); + } catch (error) { + console.log('setReceiveFromTarget error: ' + error.message); + } +}; + +var sucTargetAttach = function (target) { + "use strict"; + var newMessage = null, + separator = String.fromCharCode(30), + endOfText = String.fromCharCode(3), + fullContact = localStorage.phoneNumber + separator + localStorage.firstName + separator + localStorage.lastName; + + nfcTarget = target; + setReceiveFromTarget(); + + try { + newMessage = phoneNumber2NDEF(fullContact); + } catch (err) { + console.log("NDEFMessage problem: " + err.message); + } + + try { + nfcTarget.sendNDEF(newMessage, sucSendToTarget, errSendToTarget); + } catch (e) { + console.log("NDEFMessage problem: " + e.message); + } +}; + +var setTargetDetect = function () { + "use strict"; + var err = function (e) { + console.log('Target Listen Error: ' + e.message); + }, + suc = { onattach: sucTargetAttach, ondetach: sucDetach }; + try { + nfcAdapter.setPeerListener(suc, err); + } catch (error) { + console.log('error: ' + error.message); + } +}; \ No newline at end of file diff --git a/js/main.js b/js/main.js new file mode 100644 index 0000000..1932e73 --- /dev/null +++ b/js/main.js @@ -0,0 +1,412 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint devel: true*/ +/*global $, tizen, timeExpired, contactList: true, moveToStartPage, stopNFC, setTagDetectRead, setTagDetectWrite, setTargetDetect, startNFC */ + +var nfcAdapter = null; +var addressBook = null; +var appStarted = false; +var timeOutHandler = null; +var popup = null; +var nfcTarget = null; +var nfcStateMemory = false; + +var showPopup = function (message, page) { + "use strict"; + popup = $(''); + page.append(popup); + page.trigger('create'); + popup.data('page', page); + popup.popupwindow('open'); +}; + +var closePopup = function () { + "use strict"; + var page = popup.data('page'); + page.data('monit', ''); + popup.popupwindow('close'); + popup.remove(); +}; + +var disableAccept = function () { + "use strict"; + $('#accept-choose').css('pointer-events', 'none').addClass('ui-disabled'); +}; + +var enableAccept = function () { + "use strict"; + $('#accept-choose').css('pointer-events', 'auto').removeClass('ui-disabled'); +}; + +var checkCharsSize = function (string) { + "use strict"; + var i, result = '', length = string.length; + for (i = 0; i < length; i += 1) { + if (string.charCodeAt(i) < 256) { + result += string[i]; + } + } + return result; +}; + +var saveDefaultCard = function () { + "use strict"; + var elementSelected = $('#message-chat li.selected'); + localStorage.started = true; + localStorage.id = elementSelected.attr('id'); + localStorage.firstName = checkCharsSize(elementSelected.attr('firstName')); + localStorage.lastName = checkCharsSize(elementSelected.attr('lastName')); + localStorage.phoneNumber = checkCharsSize(elementSelected.attr('phoneNumber')); + localStorage.vCard = elementSelected.attr('vCard'); + $.mobile.changePage('#start'); +}; + +var initAddressBook = function () { + "use strict"; + var addressBooksCB = function (addressbooks) { + if (addressbooks.length > 0) { + addressBook = addressbooks[0]; + } else { + console.log('addressBook: failed'); + } + }, + errorCB = function (e) { + console.log('problem with getAddressBooks() method: ' + e.message); + }; + + try { + tizen.contact.getAddressBooks(addressBooksCB, errorCB); + } catch (e) { + console.log('problem with getAddressBooks() method: ' + e.message); + } +}; + +var createListRecord = function (contacts) { + "use strict"; + contactList = contacts; + $.mobile.changePage('#choose'); +}; + +var prepareCallerName = function (contact) { + "use strict"; + var callerName, firstName, lastName; + callerName = ''; + firstName = contact.name.firstName; + lastName = contact.name.lastName; + if (firstName !== '' && firstName !== null) { + callerName = firstName; + } + if (lastName !== '' && lastName !== null) { + if (callerName === '') { + callerName += lastName; + } else { + callerName += ' '; + callerName += lastName; + } + } + if (callerName === '') { + callerName = 'no name'; + } + return callerName; +}; + +var showContactsList = function () { + "use strict"; + var errorCB, + contactsFoundCB; + + contactsFoundCB = function (contacts) { + var ul = $('
        '), + listElementTap, + sortedContactList = [], + i, + j, + len, + length, + firstName = '', + lastName = '', + phoneNumber = '', + id, + vCard, + listElement; + + $('#choose > #content-choose > .ui-scrollview-view').empty().append(ul); + + listElementTap = function (event) { + event.preventDefault(); + enableAccept(); + $(this).parent().find('li').css('background-color', '#fff').removeClass('selected'); + $(this).css('background-color', '#ccc').addClass('selected'); + }; + + for (i = 0, len = contacts.length; i < len; i += 1) { + firstName = ''; + lastName = ''; + phoneNumber = ''; + id = contacts[i].id; + vCard = contacts[i].convertToString('VCARD_30'); + if (contacts[i].name.firstName !== null) { + firstName = contacts[i].name.firstName; + } + if (contacts[i].name.lastName !== null) { + lastName = contacts[i].name.lastName; + } + if (contacts[i].phoneNumbers[0] !== undefined) { + phoneNumber = contacts[i].phoneNumbers[0].number; + } + sortedContactList.push({caller: prepareCallerName(contacts[i]), firstName: firstName, lastName: lastName, phoneNumber: phoneNumber, id: id, vCard: vCard, contact: contacts[i]}); + } + + sortedContactList.sort(function (a, b) { + if (a.caller < b.caller) { + return -1; + } + if (a.caller > b.caller) { + return 1; + } + return 0; + }); + + for (j = 0, length = sortedContactList.length; j < length; j += 1) { + listElement = $('
      • ' + sortedContactList[j].caller + '' + sortedContactList[j].phoneNumber + '
      • '); + if (localStorage.id === listElement.attr('id')) { + listElement.css('background-color', '#ccc'); + } + listElement.on('tap', listElementTap); + ul.append(listElement); + } + + $('#choose > #content-choose').trigger('create'); + }; + errorCB = function (e) { + console.log('problem with find() method: ' + e.message); + }; + addressBook.find(contactsFoundCB, errorCB); +}; + +var countDown = function (time, obj) { + "use strict"; + obj.text(time); + if (time > 0) { + time -= 1; + timeOutHandler = setTimeout(function () { countDown(time, obj); }, 1000); + } else { + timeExpired(); + } +}; + +var prepareWaitingPage = function (title, text) { + "use strict"; + var waitingBox, waitingContent; + waitingBox = $('
        '); + waitingContent = $('

        ' + text + '

        '); + $('#header-transfer H1').text(title); + $('#content-transfer .ui-scrollview-view').empty(); + waitingBox.append(waitingContent); + $('#content-transfer .ui-scrollview-view').append(waitingBox); + $('#content-start').trigger('create'); + countDown(10, $('#counter')); +}; + +var loadTemporaryContent = function () { + "use strict"; + var temporaryBox, temporaryContent, temporaryButton; + temporaryBox = $('
        '); + temporaryContent = $('

        Default card hasn\'t defined yet!
        Do you want to define it now?

        '); + temporaryButton = $('
        Create default card
        '); + + temporaryButton.on('tap', function (event) { + event.preventDefault(); + $.mobile.changePage('#choose'); + }); + + $('#content-start .ui-scrollview-view').empty(); + temporaryBox.append(temporaryContent).append(temporaryButton); + $('#content-start .ui-scrollview-view').append(temporaryBox); + $('#content-start').trigger('create'); +}; + +var loadStartContent = function () { + "use strict"; + var startBox, gap, comment, changeContact, readFromCard, writeToCard, communicateWithOtherDevice; + startBox = $('
        '); + gap = $('
        '); + comment = $('

        Your default contact

        ( ' + (localStorage.firstName || '') + ' ' + (localStorage.lastName || '') + ' )

        '); + changeContact = $('
        Change your default contact
        '); + changeContact.on('tap', function (event) { + event.preventDefault(); + $.mobile.changePage('#choose'); + }); + readFromCard = $('
        Read from card
        '); + readFromCard.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'read'); + $.mobile.changePage('#transfer'); + }); + writeToCard = $('
        Write to card
        '); + writeToCard.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'write'); + $.mobile.changePage('#transfer'); + }); + communicateWithOtherDevice = $('
        Communicate with other device
        '); + communicateWithOtherDevice.on('tap', function (event) { + event.preventDefault(); + $('#transfer').data('option', 'communicate'); + $.mobile.changePage('#transfer'); + }); + + $('#content-start .ui-scrollview-view').empty(); + startBox.append(changeContact).append(gap.clone()).append(readFromCard).append(gap.clone()).append(writeToCard).append(gap.clone()).append(communicateWithOtherDevice); + $('#content-start .ui-scrollview-view').append(comment); + $('#content-start .ui-scrollview-view').append(startBox); + $('#content-start').trigger('create'); +}; + +var loadStartPage = function () { + "use strict"; + if (localStorage.started === undefined) { + loadTemporaryContent(); + } else { + loadStartContent(); + } +}; + +var prepareContactsTemplate = function (phone, first, last) { + "use strict"; + var i, ul; + + ul = $('
          '); + $('#contact > #content-contact > .ui-scrollview-view').empty().append(ul); + + ul.append($('
        • ' + ((first === '' || first === 'null') ? '...' : first) + 'First Name
        • ')); + ul.append($('
        • ' + ((last === '' || last === 'null') ? '...' : last) + 'Last Name
        • ')); + ul.append($('
        • ' + ((phone === '' || phone === 'null') ? '...' : phone) + 'Phone Number
        • ')); + + $('#contact > #content-contact').trigger('create'); +}; + +var saveContact = function () { + "use strict"; + var phone, first, last, contactPage = $('#contact'), contact = null; + phone = contactPage.data('contactsData').phone; + first = contactPage.data('contactsData').first; + last = contactPage.data('contactsData').last; + + try { + contact = new tizen.Contact({name: new tizen.ContactName({firstName: first, lastName: last}), phoneNumbers: [new tizen.ContactPhoneNumber(phone)]}); + addressBook.add(contact); + moveToStartPage('New contact added'); + } catch (err) { + moveToStartPage('Problem with new contact adding'); + console.log('The following error occurred while adding: ' + err.name); + } +}; + +var defineEvents = function () { + "use strict"; + $('#header-start .ui-btn-back').on('tap', function (event) { + event.preventDefault(); + stopNFC(); + }); + + $('#footer-transfer').on('tap', '.ui-btn-back', function (event) { + event.preventDefault(); + timeExpired(); + }); + + $('#footer-contact').on('tap', '.ui-btn-back', function (event) { + event.preventDefault(); + $.mobile.changePage('#start'); + }); + + $('#choose').on('pagebeforeshow', function () { + disableAccept(); + }); + + $('#choose').on('pageshow', function (event) { + showContactsList(); + }); + + $('#contact').on('pageshow', function (event) { + var phone, first, last; + phone = $(this).data('contactsData').phone; + first = $(this).data('contactsData').first; + last = $(this).data('contactsData').last; + prepareContactsTemplate(phone, first, last); + }); + + $('#accept-choose').on('tap', function (event) { + event.preventDefault(); + saveDefaultCard(); + }); + + $('#save-contact').on('tap', function (event) { + event.preventDefault(); + saveContact(); + }); + + $('#start').on('pagebeforeshow', function () { + if (appStarted) { + loadStartPage(); + } + }); + + $('#start').on('pageshow', function () { + var monit, obj; + obj = $(this); + monit = obj.data('monit'); + if (monit !== '' && monit !== undefined) { + showPopup(obj.data('monit'), obj); + } + }); + + $('#transfer').on('pageshow', function () { + var option = $(this).data('option'); + if (option === 'read') { + prepareWaitingPage('Card to Device', 'PUT WIRELESS TAG
          CLOSE TO
          YOUR DEVICE'); + try { + setTagDetectRead(); + } catch (err) { + console.log(err); + } + } else if (option === 'write') { + prepareWaitingPage('Device to Card', 'PUT WIRELESS TAG
          CLOSE TO
          YOUR DEVICE'); + try { + setTagDetectWrite(); + } catch (er) { + console.log(er); + } + } else { + prepareWaitingPage('Device to Device', 'PUT YOUR DEVICE
          CLOSE TO
          OTHER DEVICE'); + try { + setTargetDetect(); + } catch (e) { + console.log(e); + } + } + }); +}; + +var init = function () { + "use strict"; + defineEvents(); + initAddressBook(); + startNFC(); +}; + +$(document).ready(init); \ No newline at end of file diff --git a/js/nfc_common.js b/js/nfc_common.js new file mode 100644 index 0000000..29d49e3 --- /dev/null +++ b/js/nfc_common.js @@ -0,0 +1,174 @@ +/*jslint devel: true*/ +/*global $, tizen, nfcAdapter: true, appStarted: true, timeOutHandler, nfcTarget: true, nfcStateMemory: true, convertNDEF2phoneNumber, loadStartPage, resolveContact, displayContact: true */ + +var fillRecordInfo = function (record) { + "use strict"; + try { + var contactsData = resolveContact(convertNDEF2phoneNumber(record.payload)); + displayContact(contactsData); + } catch (error) { + console.log(error); + } +}; + +var readMessage = function (message) { + "use strict"; + try { + fillRecordInfo(message.records[0]); + } catch (e) { + console.log(e.message); + } +}; + +var contact2NDEF = function (contact) { + "use strict"; + var t, a = [], i, newMessage = new tizen.NDEFMessage(); + if (typeof contact === 'string') { + t = contact; + } else { + t = contact.convertToString("VCARD_30"); + } + a.length = t.length; + for (i = 0; i < a.length; i += 1) { + a[i] = t.charCodeAt(i); + } + newMessage.records[0] = new tizen.NDEFRecordMedia('text/x-vcard', a); + return newMessage; +}; + +var phoneNumber2NDEF = function (contact) { + "use strict"; + var phoneNumberArray = [], i, length = contact.length, newMessage = new tizen.NDEFMessage(); + for (i = 0; i < length; i += 1) { + phoneNumberArray.push(contact.charCodeAt(i)); + } + newMessage.records[0] = new tizen.NDEFRecordMedia('text/x-vcard', phoneNumberArray); + return newMessage; +}; + +var convertNDEF2phoneNumber = function (contact) { + "use strict"; + var i, length = contact.length, phoneNumber = ''; + for (i = 0; i < length; i += 1) { + phoneNumber += String.fromCharCode(contact[i]); + } + return phoneNumber; +}; + +var startNFC = function () { + "use strict"; + var onPowerOn, onPowerOnFails; + + onPowerOn = function () { + appStarted = true; + loadStartPage(); + }; + onPowerOnFails = function (err) { + console.log('Power On error: ' + err.message); + }; + + try { + nfcAdapter = tizen.nfc.getDefaultAdapter(); + try { + if (nfcAdapter.powered) { + nfcStateMemory = true; + onPowerOn(); + } else { + nfcStateMemory = false; + nfcAdapter.setPowered(true, onPowerOn, onPowerOnFails); + } + } catch (err) { + console.log('setPowered(true) problem: ' + err); + } + } catch (e) { + console.log('getDefaultAdapter() method problem: ' + e); + } +}; + +var stopNFC = function () { + "use strict"; + var onPowerOff, onPowerOffFails; + + onPowerOff = function () { + tizen.application.getCurrentApplication().exit(); + }; + + onPowerOffFails = function (err) { + console.log('Power Off error: ' + err.message); + tizen.application.getCurrentApplication().exit(); + }; + + try { + if (nfcStateMemory) { + onPowerOff(); + } else { + nfcAdapter.setPowered(false, onPowerOff, onPowerOffFails); + } + } catch (err) { + console.log('setPowered(false) problem: ' + err); + } +}; + +var unsetTargetDetect = function () { + "use strict"; + try { + nfcTarget.unsetReceiveNDEFListener(); + nfcTarget = null; + } catch (error) { + console.log('error: ' + error.message); + } + try { + nfcAdapter.unsetPeerListener(); + } catch (e) { + console.log('error: ' + e.message); + } +}; + +var unsetTagDetect = function () { + "use strict"; + try { + nfcAdapter.unsetTagListener(); + } catch (error) { + console.log('error: ' + error.message); + } +}; + +var moveToStartPage = function (monit) { + "use strict"; + $('#start').data('monit', monit || ''); + $.mobile.changePage('#start'); +}; + +var moveToContactPage = function (obj) { + "use strict"; + $('#start').data('monit', ''); + $('#contact').data('contactsData', obj); + $.mobile.changePage('#contact'); +}; + +var timeExpired = function (monit) { + "use strict"; + clearTimeout(timeOutHandler); + if (nfcTarget) { + unsetTargetDetect(); + } else { + unsetTagDetect(); + } + moveToStartPage(monit); +}; + +var displayContact = function (obj) { + "use strict"; + clearTimeout(timeOutHandler); + if (nfcTarget) { + unsetTargetDetect(); + } else { + unsetTagDetect(); + } + moveToContactPage(obj); +}; + +var sucDetach = function () { + "use strict"; + console.log('sucDetach'); +}; \ No newline at end of file diff --git a/js/read_from_card.js b/js/read_from_card.js new file mode 100644 index 0000000..559517a --- /dev/null +++ b/js/read_from_card.js @@ -0,0 +1,58 @@ +/*jslint devel: true*/ +/*global $, tizen, nfcAdapter, timeOutHandler, timeExpired, readMessage, sucDetach */ + +var resolveContact = function (contactsString) { + "use strict"; + var separator = String.fromCharCode(30), + endOfText = String.fromCharCode(3), + contactsArray, + phone = '', + first = '', + last = '', + resolveData; + + contactsArray = contactsString.split(separator); + + resolveData = function (value) { + if (!value) { + return ''; + } + return value.replace(endOfText, '…'); + }; + + phone = resolveData(contactsArray[0]); + first = resolveData(contactsArray[1]); + last = resolveData(contactsArray[2]); + return {phone: phone, first: first, last: last}; +}; + +var readMessageErr = function (e) { + "use strict"; + timeExpired('Read error!'); +}; + +var sucTagReadAttach = function (tag) { + "use strict"; + if (tag.isSupportedNDEF) { + tag.readNDEF(readMessage, readMessageErr); + } else { + console.log("This Tag doesn't support NDEF"); + } +}; + +var setTagDetectRead = function () { + "use strict"; + /* + var err, suc; + err = function (e) { + console.log('Tag Listen Error: ' + e.message); + }; + */ + var suc = { onattach: sucTagReadAttach, ondetach: sucDetach }; + try { + //nfcAdapter.setTagListener(suc, err); + nfcAdapter.setTagListener(suc); + } catch (error) { + console.log('error: ' + error.message); + } +}; \ No newline at end of file diff --git a/js/write_to_card.js b/js/write_to_card.js new file mode 100644 index 0000000..f69087b --- /dev/null +++ b/js/write_to_card.js @@ -0,0 +1,66 @@ +/*jslint devel: true*/ +/*global $, tizen, nfcAdapter, timeOutHandler, timeExpired, phoneNumber2NDEF, sucDetach */ + +var sucSend = function () { + "use strict"; + console.log('sucSend'); + timeExpired('Send success!'); +}; + +var errSend = function (e) { + "use strict"; + console.log('errSend'); + timeExpired('Send problem! ' + e.message); +}; + +var prepareForNFC; + +var sucTagWriteAttach = function (tag) { + "use strict"; + var newMessage = null, + separator = String.fromCharCode(30), + endOfText = String.fromCharCode(3), + fullContact = localStorage.phoneNumber + separator + localStorage.firstName + separator + localStorage.lastName, + prepareForNFC; + + prepareForNFC = prepareForNFC || function prepareForNFC(contact) { + if (contact.length > 31) { + contact = contact.substring(0, 31); + if (contact[29] !== separator) { + contact = contact.substring(0, 30) + endOfText; + } + } + return contact; + }; + + fullContact = prepareForNFC(fullContact); + + try { + newMessage = phoneNumber2NDEF(fullContact); + } catch (err) { + console.log("NDEFMessage problem: " + err.message); + } + + if (tag.isSupportedNDEF) { + tag.writeNDEF(newMessage, sucSend, errSend); + } else { + console.log("This Tag doesn't support NDEF"); + } +}; + +var setTagDetectWrite = function () { + "use strict"; + /* + var err, suc; + err = function (e) { + console.log('Tag Listen Error: ' + e.message); + }; + */ + var suc = { onattach: sucTagWriteAttach, ondetach: sucDetach }; + try { + //nfcAdapter.setTagListener(suc, err); + nfcAdapter.setTagListener(suc); + } catch (error) { + console.log('error: ' + error.message); + } +}; \ No newline at end of file diff --git a/signature1.xml b/signature1.xml new file mode 100755 index 0000000..349bf9b --- /dev/null +++ b/signature1.xml @@ -0,0 +1,92 @@ + + + + + + +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