関西nfclab勉強会資料

Download 関西NFCLab勉強会資料

If you can't read please download the document

Upload: satoshi-kohno

Post on 24-May-2015

3.268 views

Category:

Documents


0 download

DESCRIPTION

AndroidでNFCを反応させるまでの話と簡単に規格の話

TRANSCRIPT

  • 1. AndroidNFC

2. (@esperia09)Re: Kayo-SystemWeb 3. http://atnd.org/event/E0008274 4. http://atnd.org/event/E0008274 5. ^Y^Y^Y^Y^Y^Y^Y^ 6. AgendaAndroidNFCAndroidNFC 7. 8. NFC3NFC Card Emulation ModeNFC Peer-to-Peer Mode Android BeamReader/Writer Mode (ICOCA, Suica)Taspo 9. NFC3NFC Card Emulation ModeNFC Peer-to-Peer Mode Android BeamReader/Writer Mode (ICOCA, Suica)Taspo 10. AndroidNDEF(NFC Data Exchange Format; NFC) NFC-A (ISO 14443-3A) NFC-B (ISO 14443-3B) NFC-F (JIS 6319-4)AndroidNFCNDEFhttp://www.nfc-forum.org/resources/white_papers/japanese_nfc_in_the_real_world_III.pdf 11. AndroidNFCNFC(NFC)NFC NFC 12. NFCAndroid Xperia S Xperia ion AQUOS PHONE SERIE ISW16SHF Nexus S GALAXY S II LTE SC-03D GALAXY NEXUS SC-04D GALAXY Note SC-05D GALAXY S II WiMAX ISW11SCAndroid FT701/RW-T107 http://www.nfcworld.com/nfc-phones-list/ Nexus 7 http://ja.wikipedia.org/wiki/ 13. NFCAndroid 4.xAndroid 2.3.x 14. AndroidNFC 15. AndroidNFCNFCNFC 16. AndroidAndroid AndroidNFCNFCNFCNFC()MIME-TypeURIMIME-TypeURIIntentIntentNFC 17. NFCIntent ACTION_NDEF_DISCOVERED ACTION_TECH_DISCOVERED ACTION_TAG_DISCOVEREDNDEFACTION_NDEF_DISCOVEREDACTION_TECH_DISCOVEREDACTION_TAG_DISCOVERED 18. 19. ...AndroidManifest.xmlintent-filterNFCIntent NFCNDEF 20. NFC 21. NFCNFCIntentFilter 22. AndroidManifest.xmlNFC Google Play... 23. NFC onResume()NFCIntent(NfcAdapter#enableForegroundDispatch()) onPause()(NfcAdapter#disableForegroundDispatch()) 24. @Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);mNfcAdapter = NfcAdapter.getDefaultAdapter(getApplicationContext());} NFC@OverrideNFCprotected void onResume() {super.onResume();...NFCmNfcAdapter.enableForegroundDispatch(Intentthis, pendingIntent, filters, techLists);}@Overrideprotected void onPause() {super.onPause();mNfcAdapter.disableForegroundDispatch(this);} 25. @Overridepublic void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);mNfcAdapter = NfcAdapter.getDefaultAdapter(getApplicationContext());}@Overrideprotected void onResume() { super.onResume(); ...mNfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, techLists);}@Overrideprotected void onPause() {super.onPause();mNfcAdapter.disableForegroundDispatch(this);} 26. ActivitymNfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, techLists);this(#disableForegroundDispatch)Activity 27. mNfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, techLists);Intent intent = new Intent(this, getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);NFCActivityIntent (getClass()) PendingIntent Intent 28. IntentFilter mNfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, techLists);IntentFilter ndefFilter = new IntentFilter(NfcAdapter.ACTION_NDEF_DISCOVERED);try {ndefFilter.addDataType("*/*");} catch (MalformedMimeTypeException e) {throw new RuntimeException("fail", e);}IntentFilter techFilter = new IntentFilter(NfcAdapter.ACTION_TECH_DISCOVERED);IntentFilter[] filters = new IntentFilter[] { ndefFilter, techFilter }; NDEF techLists filtersnull 29. NFC mNfcAdapter.enableForegroundDispatch(this, pendingIntent, filters, techLists);String[][] techLists = new String[][] { new String[] { NfcF.class.getName() }, new String[] { Ndef.class.getName() } };FeliCa(NfcF) techListsnullNFC 30. @Override protected void onNewIntent(Intent intent) { Tag tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); if (tag != null) { Toast.makeText(getApplicationContext(), tag.toString(), Toast.LENGTH_SHORT).show(); // } }Tag 31. Gisthttps://gist.github.com/3384118 32. 33. NFC TagInfo by NXPNFC NXP( ) 34. NFC TagWriter by NXPNFC NXP 35. 36. Sony Japan | FeliCa | NFC | NFChttp://www.sony.co.jp/Products/felica/NFC/FeliCa/NFCAndroidhttp://www.slideshare.net/somafire/felicanfcandroid-6538882i.1 NFC - http://www.techdoctranslator.com/android/guide/nfc/nfci.2 NFC - http://www.techdoctranslator.com/android/guide/nfc/advanced-nfc 37. NFCNFCNFCNFChttp://www.nfc-world.com/about/01.htmlIC CARD WORLD 2011 - Sony Android tablet & NFC/FeliCahttp://www.slideshare.net/somafire/ic-card-workd-2011-sony-android-tablet-nfcfelicaY.A.M : NDEF http://y-anz-m.blogspot.jp/2011/01/ndef.htmlABC2011Winter NFC (vvakame)http://www.slideshare.net/vvakame/abc2011winter-nfcAndroid NFCNexusS MifareClassic ()http://yumewaza.yumemi.co.jp/2011/03/android_nfc_nexuss_mifare_classic_3.htmlArduino+RC-S620/SPollingIDm - http://www.atelier-nodoka.net/2012/05/arduino-rcs620s-tginittarget/List of NFC phoneshttp://www.nfcworld.com/nfc-phones-list/japanese_nfc_in_the_real_world_III.pdf (application/pdf )http://www.nfc-forum.org/resources/white_papers/japanese_nfc_in_the_real_world_III.pdfNFCDemo - NFC - https://sites.google.com/a/techdoctranslator.com/jp/resources/samples/samples-index/nfcdemo-index