23.04.2014 Views

HAKI-NFC Based Android Application - IRNet Explore

HAKI-NFC Based Android Application - IRNet Explore

HAKI-NFC Based Android Application - IRNet Explore

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>HAKI</strong>-<strong>NFC</strong> <strong>Based</strong> <strong>Android</strong> <strong>Application</strong><br />

Fig. 4.7 : Write Plaintext<br />

The Basic Principle for Writing to a Tag will be to<br />

encapsulate the bytes of data into a NdefRecord first.<br />

e.g.<br />

For a record containing text<br />

(1) NdefRecord record = new NdefRecord<br />

(NdefRecord.TNF_WELL_KNOWN,<br />

NdefRecord.RTD_TEXT, new byte[0], data);<br />

After this the NdefRecords thus created are<br />

encapsulated into NdefMessage.<br />

(2) NdefMessage textMessage = new NdefMessage<br />

(new NdefRecord [] {record});<br />

This NdefMessage is then written onto tag through<br />

radio waves when tag and phone is within a range of<br />

4cm. For information on types of NdefMessage that can<br />

be written refer [8] .<br />

B. Helping Visually Impaired<br />

<strong>HAKI</strong> will help visually impaired people with an<br />

intuitive way to select objects. <strong>HAKI</strong> will make the<br />

retail experience more accessible and simple for blind<br />

and partially sighted. Using phones it will help them get<br />

product information — including the name of a product,<br />

its price and details of what it contains in voice based<br />

description form— by reading an <strong>NFC</strong> tag. <strong>HAKI</strong> can<br />

also be used at home where <strong>NFC</strong> stickers can be stacked<br />

to medicine, syrups, CD’s etc. So that<br />

How Will It Work?<br />

<strong>NFC</strong> tag will be containing text information<br />

regarding object description.<br />

For example- “Product Name: Music CD<br />

Quantity: 1<br />

Price: 150 Rupees”<br />

“Product Name: HP Laptop<br />

Processor: AMD turion<br />

RAM: 4GB<br />

Price: 40,000 Rupees”<br />

Huge information can be written as the tag memory<br />

size is available in different sizes.<br />

Now with the help of <strong>HAKI</strong>, when the mobile is<br />

brought near the tag, android’s tag dispatch system<br />

again does it works as discussed above. The activity<br />

which is supposed to handle this intent is has its intent<br />

filter as shown<br />

<br />

<br />

<br />

<br />

Mime type specifies the activity to start only if the<br />

tag contains text data. How Tag Data is read is already<br />

discussed in section 4.1.2. After detecting the tag,<br />

instantly the textual information is processed and<br />

converted into speech with the help of android text-tospeech<br />

engine [8] . Then the phone will just read out the<br />

product description on simply tapping the phone to the<br />

tag.<br />

C. Monitoring the attendance of employee<br />

Employees I.D. card will be containing his name<br />

and I.D. This information can be used to mark his<br />

attendance. All that an employee has to do is to tap his<br />

phone (or I.D. Card) on <strong>NFC</strong> reader. His I.D. will be<br />

read and will be used to mark his attendance. Again the<br />

principle of reading from tag will be same as section<br />

4.1.2. The attendance database will be stored on a<br />

remote server. PHP will be used as middleware. The<br />

remote database will be that of MySQL.<br />

Once Name and I.D. is read by using <strong>NFC</strong>,<br />

appropriate Activity will be launched by <strong>Android</strong> Tag<br />

Dispatch System as discussed in section 4.1.2. This<br />

Activity will be used for connecting to remote database<br />

and updating it. The main reason for taking a scripting<br />

language like PHP is because of the interaction with<br />

databases it can offer. For making connection to PHP<br />

script, we will use HTTP protocol from the android<br />

system. If we talk about client-server architecture, client<br />

<strong>IRNet</strong> Transactions on Computer Science and Engineering<br />

18

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!