WIP Back to School Webinars - Android and Near-Field Communications (NFC) presented by Vivotech

Post on 29-Jun-2015

1.813 views 0 download

Tags:

description

Near Field Communications(NFC) is a fast growing technology which enables devices to connect and communicate when they are few centimeters apart. Currently NFC has been tested for several applications like mobile wallet, ticketing , secure entry, sharing the data between the devices etc. Banks, mobile operators, phone manufacturers and several other companies are working together to bring those applications and required ecosystem to everyone. Mobile wallet will be one of the important application and it allows users to download soft payment cards, loyalty cards, gift cards, coupons etc and use them with a tap. Latest version of Android mobile OS has support for NFC and several other companies expressed the availability of NFC capability in their upcoming version of software and devices.

Transcript of WIP Back to School Webinars - Android and Near-Field Communications (NFC) presented by Vivotech

Android and Near Field Communications

Venkata Sastry Akella

- Vivotech

NFC Introduction

• NFC is a very short range wireless communication technology works at 13.56Mhz frequency

• NFC range is about 4 cm

• Data speeds (106 kbits/s – 848 kbits/s)

• NFC standard is being developed by http://www.nfc-forum.org

NFC Connection

NFC connectionWith a tap on smart tag

NFC Communication Modes

• Active Communication: – Both initiator and target creates RF field. – Example: Both the devies are NFC enabled

phones

• Passive Communication:– Initiator creates the RF field that powers the

target– Example: Smart tags(RFID tags)

NFC Operating Modes

• Card Emulation Mode– In this mode, NFC device emulates a contact

less card– Examples

• NFC phone in this mode can be used as contact less credit card

• NFC phone in this mode can be used as transit card (BART contactless card)

NFC Peer to Peer Mode

• Peer to Peer mode enables devices to communicate with each other– Examples:

• In this mode NFC enabled phones can exchange contact information, pictures any other data

• NFC enabled phone and NFC enabled POS reader can exchange transaction data over Peer to Peer

NFC Reader/Writer Mode

• Reader/Writer mode enables devices to interact with RF tags– Examples:

• NFC enabled phone can be used read smart poster

• NFC enabled phone can be used to program rfid tag

NFC Support in Mobile Platforms

• Android: Android SDK 2.3.3 and above versions has support for NFC.– Samsung Nexus S

• Blackberry OS: Blackberry latest version has support for NFC.– Couple of bold models are announced with

NFC

• iOS and Windows expected to have NFC support by next year.

ViVOtech Mobile Wallet/TSMViVOtech Mobile Wallet/TSM SolutionsSolutions

9

ContentProviders

Trusted Service Provider

Issuer ServerTrusted Service Provider (TSP)

Issuer Servers

Trusted Service Manager (TSM)

Control Server

Web Network

Signage

mTouch Trigger Manager

Web Network

Mobile Network

OTA OTA

NFC point of sale touchpoint reader Hardware &

Software

POS, Loyalty Systems

Financial POS Network

Web Network

Redemption Notifications

mTouch Content Manager

NFC support in Android

• In the latest version of Android 2.3.4/2.3.5 has support for– Smart tag (RF tag) reading– Smart tag (RF tag) writing– P2P mode support– Contact less card emulation

Android NFC APIs

• Android.nfc package:– NfcManager : High level manager to get

NfcAdapter instance– NfcAdapter: Represents the local NFC

adapter– NdefMessage: Represents nfc-forum defined

NDEF– NdefRecord: Represents nfc-forum defined

NDEF record.

Android NFC APIs

• Android.nfc.tech : These classes provides access to tag technology features– NfcA, NfcB, NfcF, NfcV : Provides access to

NFC-A, NFC-B, NFC-F, NFC-V properties and i/o operations

– MifareClassic, MifareUltraLight: Provides access to NXP’s MIFARE classic and ultralight tag properties and i/o operations

Android Tag Reading

• Register to receive intents with actions– NfcAdapter.ACTION_TAG_DISCOVERED– NfcAdapter.ACTION_TECH_DISCOVERED– NfcAdapter.ACTION_NDEF_DISCOVERED

• On tapping on the tag, app receives the intent with the tag data

– Parcelable[] rawMsgs = intent.getParcelableArrayExtra(NfcAdapter.EXTRA_NDEF_MESSAGES);

NdefMessage[] msgs;

msgs[i] = (NdefMessage) rawMsgs[i];

• Parse Records from NdefMessage. Example: The record could be a URI.

Android Tag Writing

• Register to receive intent with the actions– NfcAdapter.ACTION_TECH_DISCOVERED

• Tap the NFC enabled phone tag to receive intent

– Tag mTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);

NdefFormatable tag = NdefFormatable.get(t);

NdefRecord record = NdefRecord(NdefRecord.TNF_WELL_KNOWN, NdefRecord.RTD_TEXT, new byte[0], data);

NdefRecord[] records = {text};NdefMessage message = new NdefMessage(records);tag.connect();tag.format(message);

Google Wallet

Soft payment cardsOffersOne tap payment

Further Reading

• NFC specifications available at– http://www.nfc-forum.org/home/

• Android SDK, Dev guides etc at– http://developer.android.com