Cosc 4/5730 Android and Blackberry Near Field Communications (NFC)

Slides:



Advertisements
Similar presentations
Cosc 5/4730 Android Services. What is a service? From android developer web pages: Most confusion about the Service class actually revolves around what.
Advertisements

Bryan Donyanavard Nik Sumikawa. Project Description Transfer data between two mobile phones via Bluetooth. A unique cell phone movement will establish.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
UNDERSTANDING JAVA APIS FOR MOBILE DEVICES v0.01.
QR Codes By Christy Lynch. What is a QR Code  QR stands for “Quick Response”  While around since 1994, they are just catching on in the US with the.
DeVry University Donelle Vance. GRAB - The Cross Platform iPhone, iPad & Android Phone Sharing Application August 2011.
Android Application Development. Agenda  Android Business Model  Why Android  Android application market space  Market Segments & Target customers.
Cosc 5/4730 Android SMS. A note first Depending on the API level, an import changes because of a deprecated API 3 uses – import android.telephony.gsm.SmsManager;
Near Field Communication By Van Logan HTM 304. What is Near Field Communication Short range wireless communication technology between electronic devices.
Getting Started with Android Development Rohit Ghatol.
NFC.  Near Filed Communication  Is a short range high frequency wireless communication technology  Low speed (106 to 424 kbps)  Low friction setup.
Cosc 5/4730 Sign, convert, and install Android files on Blackberry Playbook.
CS378 - Mobile Computing What's Next?. Fragments Added in Android 3.0, a release aimed at tablets A fragment is a portion of the UI in an Activity multiple.
Presented by: Arpit Jain Guided by: Prof. D.B. Phatak.
Smartphones Adrián Preciado. Smartphones Index 1.iPhone OS 1.1Pros 1.2Cons 1.3Different iPhones 1.4 App Store 2.Android 2.1Pros 2.2Cons 2.3 Some phones.
Cosc 4/5730 Android and Blackberry Near Field Communications (NFC)
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
NEAR FIELD COMMUNICATION. WHAT IS NFC??? NFC or Near Field Communication is a short range high frequency wireless communication technology. A radio communication.
© 2012-Robert G Parker May 24, 2012 Page: 1 © 2012-Robert G Parker May 24, 2012 Page: 1 © 2012-Robert G Parker May 24, 2012 Page: 1 © 2012-Robert G Parker.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Computer Science, Software Engineering & Robotics Workshop, FGCU, April 27-28, 2012 Near Field Communication: Experiments with Android Michael Humphries.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 5: Investigate! Android Lists, Arrays,
Cosc 5/4730 Introduction: Threads, Android Activities, and MVC.
Basic Android Tutorial USF’s Association for Computing Machinery.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
Integrating with Android Services. Introduction  Android has numerous built-in functionality that can be called from within your applications  SMS/MMS.
Cosc 5/4730 Broadcast Receiver. Broadcast receiver A broadcast receiver (short receiver) – is an Android component which allows you to register for system.
Mobile Application Development using Android Lecture 2.
DUE Hello World on the Android Platform.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Windows Phone 8 Tips & Tricks for Developers Sascha Corti, Microsoft Switzerland Technical Evangelist | techpreacher.corti.com.
DATA COLLECTION METHODS CONTENT PAGE How data is collected via questionnaires. How data is collected via questionnaires. How data is collected with mark.
Near Field Communication Systems Patras, July 2006.
Ignite Presentation: Near Field Communication Harry Yang.
COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.
Submitted By: A.Anjaneyulu INTRODUCTION Near Field Communication (NFC) is based on a short-range wireless connectivity, designed for.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Cosc 4730 Android Fragments. Fragments You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own.
Innovation in Business Tom Henriksson Director, Nokia Emerging Business Unit October 3, 2006.
THE INTERNET OF THINGS (IOT). THE INTERNET OF THINGS Objects can transmit and share information without any human intervention.
Mobile Technology Last Mile Problem Solved 1. Mobile Web’s Potential Mobile Tech 2011 The Future is Now 2.
Services Background operating component without a visual interface Running in the background indefinitely Differently from Activity, Service in Android.
Cosc 4735 LocationAware API. Previous on … Before we looked at GPS location. – d-gpslocation.pptx
Near Field Communication Armando Octavio Yesenia Sunny Nidia.
Introduction to Android OS Димитър Н. Димитров Astea Solutions AD.
3 rd -party APIs Kalin Kadiev Astea Solutions AD.
/13 LLCPS draft-urien-tls-llcp-01.txt Pascal Urien IETF 86, Orlando, FL, USA March 15th
ABSTRACT Near Field Communication (NFC) is based on a short- range wireless connectivity, designed for intuitive, simple and safe interaction between.
Presenter: Tyler Newsome
A little more App Inventor and Mind the GAP!
Near Field Communication (NFC)
Google VR (gvr) CardBoard and DayDream With OpenGL
Lab 3: More Phone-Based Techniques
Instructor: Mazhar Hussain
Cosc 5/4735 AdMob for Android.
Android.
Adcanvas Platform Update Webinar
Development-Introduction
The Best Emulator App For Android To Enjoy PS Games
Sensors, maps and fragments:
THE ABC’s OF NFC.
CompTIA IT Fundamentals Study Guide (FC0-U51)
Integrating with the Windows Device Experience
Mobile APP Date: 01,10 ,
Setting up Clover Go account
Instructions for tracking booth sales
Constructors, GUI’s(Using Swing) and ActionListner
MyLion Registration Website | Mobile device
CMPE419 Mobile Application Development
Presentation transcript:

Cosc 4/5730 Android and Blackberry Near Field Communications (NFC)

NFC Near field communication (NFC) is a set of standards for smartphones and similar devices to establish radio communication with each other by touching them together or bringing them into close proximity, usually no more than an inch or so. Present and anticipated applications include contactless transactions, data exchange, and simplified setup of more complex communications such as Wi-Fi. Communication is also possible between an NFC device and an unpowered NFC chip, called a "tag".

NFC (2) NFC standards cover communications protocols and data exchange formats, and are based on existing radio-frequency identification (RFID) standards including ISO/IEC and FeliCa. The standards include ISO/IEC and those defined by the NFC Forum, which was founded in 2004 by Nokia, Philips and Sony, and now has 150 members. The Forum also promotes NFC and certifies device compliance

NFC and phones Starting with Android 2.3, the platform includes an NFC stack and framework API that allows you to read/write to NDEF (NFC Forum Data Exchange Format) tags. – For Android smartphones, that means the requirement is to be running at least Android 2.3 and have a NFC chip on the phone. Many newer phones/tablets have it now. Looks settings-> wireless More…

What do with NFC The number of applications that could use NFC is limited by only by the developers. The first major apps are things like Google wallet, payments systems, and store cards. Otherwise, contact exchange and that sort things. – Maybe adding friends in facebook, google+, etc – File/Music/Data exchange between devices But remember the devices have be really close. – Less then 4cm ( under 2 inches) – “Tap” your phone/tablet on a the wifi access point and it will send the configurations to the device.

What do with NFC (2) Think QR without a camera. – Would allow phones to easily respond and react to objects around them. Imagine a world where you can touch a phone to a poster, a piece of furniture, a tag, a keychain, a business card, anything, and expect an application to respond. – is a place you can get stickers with nfc chips in them and customized them to your “tag”, url, data, etc.

Basics: There are two major uses cases when working with NDEF data and Android: – Reading NDEF data from an NFC tag – Beaming NDEF messages from one device to another with Android Beam™ Note: – None of this will work in the android emulators. You need devices with NFC turned on.

Reading NDEF data from an NFC tag I don’t have any tags, so I’m unable to test any of the code. – The stickyNotes (android) example uses them. – The app appears to work, but I can’t test it. – Both reads and writes (I think) Uses 4.0 APIs which does not work on 4.2

Code There is a android nfc in the demo API. It will read any tag and you can send it fake to see how it works. There are some problems. See the reference for fixes.

Beam feature If you want to send a file to another android device you can use their beam feature. nfcDemo3 does this. – Allows you to select any file and then “beam” to another device. This app only needs to be installed one device, the receiving device doesn’t need this app.

Beam feature (2) First get the nfc adapter NfcAdapter = adapter=NfcAdapter.getDefaultAdapter(this); The address of the file must be in the form of Uri[], which is easy using a “chooser” Via an intent. To send the file: adapter.setBeamPushUris(file, this);

Sending “messages” To send a nfc message, it needs to be in a NdefMessage format. This is done via a call back when the user “uses the nfc option” on the screen. – This is controlled by the OS, not the user (in 4.2+ anyway). In the activity, you implement the CreateNdefMessageCallback and onNdefPushCompleteCallback.

CreateNdefMessageCallback In on create get the adapter mNfcAdapter = NfcAdapter.getDefaultAdapter(this); Register callback to set NDEF message mNfcAdapter.setNdefPushMessageCallback(this, this); And override the method: public NdefMessage createNdefMessage(NfcEvent event)

OnNdefPushCompleteCallback Register the callback in Oncreate() – Register callback to listen for message-sent success mNfcAdapter.setOnNdefPushCompleteCallback(this, this); Override the public void onNdefPushComplete(NfcEvent arg0) { A handler is needed to send messages to the activity when this callback occurs, because it happens from a binder thread, example code: mHandler.obtainMessage(MESSAGE_SENT).sendToTarget(); }

Receiving NFC messages Register the type of message you app will receive, because you activity will be stored when receiving it. – In AndroidManifest.xml file.

Receiving NFC messages (2) Override the onNewIntent(Intent intent) method, which will receive the intent with the nfc message. Pull the message of the intent with: Parcelable[] rawMsgs = intent.getParcelableArrayExtra( NfcAdapter.EXTRA_NDEF_MESSAGES); only one message sent during the beam NdefMessage msg = (NdefMessage) rawMsgs[0]; record 0 contains the MIME type, record 1 is the AAR, if present msg.getRecords()[0].getPayload() Likely need to convert to a string, since returns byte[]

Code examples stickyNotes Tested, but not sure if it works should read/write tags nfcDemo – Will send nfc message between to devices Needs to be install on both devices. nfcDemo3 – Will send a file to another nfc enable device via android Beam. Only needs to be installed on sending device.

References Android – – – information-from-the-tag information-from-the-tag – – omnibus/blob/master/NFC/FileBeam/src/com/commonsware/android/filebeam/MainActivity. java omnibus/blob/master/NFC/FileBeam/src/com/commonsware/android/filebeam/MainActivity. java – – %28android.nfc.NdefMessage,%20android.app.Activity,%20android.app.Activity...%29 %28android.nfc.NdefMessage,%20android.app.Activity,%20android.app.Activity...%29 – – – – with a video explanation as well. –