The document discusses developing NFC apps for Windows Phone 8. It covers sharing photos and URLs via NFC tap, launching apps using custom URI schemes or LaunchApp tags, storing app data on NFC tags, and enabling multi-user collaboration. Tools for creating NFC messages and connecting devices via Proximity APIs are also presented. Code demos are provided for common NFC patterns like sharing and multiplayer games.
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Developing NFC Apps in Windows Phone 8
1. LUMIA APP LABS #8
DEVELOPING NFC
APPS IN WINDOWS
PHONE 8
Andreas Jakl [@mopius]
Mopius
2. AGENDA
− NFC intro
− Share captured photos
− Share URLs
− Share your app
− Custom URI scheme
− LaunchApp tag
− Storing data on NFC tags
− Multi-user collaboration
− Tools & resources
2
3. TAP AND DO
A gesture that is a natural interaction between people in close proximity used
to trigger doing something together between the devices they are holding.
System: Near Field Proximity
(e.g., NFC)
Documentation: bit.ly/ProximitySpec
3
9. NFC DATA
NDEF Record
…
(e.g., URL)
NDEF Message
NDEF = NFC Data Exchange Format
9
10. NDEF.CODEPLEX.COM
Create NDEF Reusable
Parse information
messages & records NDEF from raw byte arrays
(standard compliant) classes
Fully documented
Open Source LGPL license
(based on Qt Mobility)
NDEF messages are standardized by the NFC Forum: http://www.nfc-forum.org/specs/
10
11. SUPPORTED RECORD TYPES
Geo tags
Social tags
Smart Poster
SMS tags
URI
Telephone call
Text
Mailto tags
LaunchApp
Android Application Record (AAR)
Windows Phone Settings
Nokia Accessories Record
NearSpeak Voice Messages
11
18. LAUNCHING APPS
Tag directly contains
app name and
parameters
Tag / phone launches app
through custom
URI scheme
18
19. CUSTOM URIS VS. LAUNCHAPP
Use less space on tag
(LaunchApp with multiple app ids: big!)
Better cross-platform compatibility
(also Android apps can be launched with custom URI)
No unique app mapping
(other apps can register for your URI scheme too!)
19
20. STORING APP DATA ON NFC TAGS
Recommended
HTTP
Custom URI LaunchApp External Windows
Website
Scheme Tag Type Protocol
Link
Safest and most Better UX for Best app launching Standardized Should not be
cross-platform app launching UX, but specific type for storing used for storing
to Windows data, but limited custom data
use on Windows
bit.ly/NfcAppData
20
22. MULTI-USER COLLABORATION
Tap for
Quick Data Long Term
Exchange Connection
ProximityDevice PeerFinder
Exchange Windows / Automatically builds
NDEF messages, Bt / WiFi Direct
SNEP protocol socket connection
22
23. ESTABLISHING
Long Term
Connection
Trigger Browse
Interact with Tap Start Search
NFC Bt, WiFi, etc.
23
25. CONNECTION STATE
Proximity gesture complete 1
Devices can be pulled away
PeerFound
Which device initiated tap gesture?
→ Connecting, other device Listening
2
Connecting /
Listening
Access socket of persistent transport
(e.g., TCP/IP, Bt) 3
Completed
25
26. NFCRPS
Multiplayer game
Tap launches app
on
2nd phone
Players decide
next move on
own device
Both see the
winner! Code Demo
26