Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
関モバ#9
Search
SeyamaKota
December 02, 2025
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
関モバ#9
NFCタグを活用して水を楽に買いたかったので、NFCについて勉強しました。
SeyamaKota
December 02, 2025
More Decks by SeyamaKota
See All by SeyamaKota
超初心者向け勉強会 Lesson1-2
seyamasan
0
12
超初心者向け勉強会 Lesson1-1
seyamasan
0
26
Androidアプリ開発に手を出してみる巻
seyamasan
0
62
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
41k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
750
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Ruling the World: When Life Gets Gamed
codingconduct
0
400
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Making Projects Easy
brettharned
120
6.8k
Agile that works and the tools we love
rasmusluckow
331
22k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Designing for Timeless Needs
cassininazir
1
530
Transcript
/'$λάΛ׆༻ͯ͠ ਫΛָʹങ͍͍ͨ ؔϞόΠϧݚڀձ" !TFZBNBTBO
ࣗݾհ w ࢁࡷଠ w גࣜձࣾϚϓϦΟ w .PCJMF"QQ&OHJOFFSʙ w Ұ࣍࢈ۀ͚ʹ%σʔλΛ׆༻ ͨ͠αʔϏεΛ։ൃ
w ࠷ۙ'MVUUFSͬͯ.PCJMF 8FCΞϓϦΛϦϦʔεͨ͠
/'$ͱ
/'$ͱ w /FBS'JFME$PNNVOJDBUJPOɺۙڑແઢ௨৴ٕज़ͷ͜ͱ w /'$Λଂͨ͠εϚϗͱλάͳͲΛ͚ۙͮΔ͜ͱͰɺσʔλ௨৴͕Ͱ͖Δ w ࠓճ/'$λάʹ63-Λॻ͖ࠐΜͰɺεϚϗΛ͔͟͢͜ͱͰϖʔδ͕ ։͘ΈΛ࡞Δ
࡞ͬͨͷˠ
None
͜Εʹॻ͖ࠐΉ w όΠτॻ͖ࠐΉ͜ͱ͕Ͱ͖Δ w ԁ͘Β͍Ͱຕങ͑Δ
/%&' w σʔλަ͢ΔͨΊͷϑΥʔϚοτ w /%&'ϝοηʔδͱɺ/%&'ϨίʔυͰߏ͞Ε͍ͯΔ w /%&'ϨίʔυσʔλͰ͋Γɺ/%&'ϝοηʔδΛߏ͢ΔͨΊʹඞཁ w /%&'Ϩίʔυʹɺ63*ͳͲͷܕࢦఆ͞Εͨσʔλؚ͕·ΕΔ
Πϝʔδ /%&' /%&'ϝοηʔδ /%&' Ϩίʔυ /%&' Ϩίʔυ /%&' Ϩίʔυ ʜ
Πϝʔδ /'$ λά /%&' ಡΈऔΓॻ͖ࠐΈ
ͱ͍͏͜ͱͰ࣮
ݖݶ w "OESPJE.BOJGFTUʹɺ/'$Λ͏ͨΊͷݖݶ͕ඞཁͰ͢ <uses-permission android:name="android.permission.NFC" /> ΛՃ͠·͢ɻ
/GD"EBQUFS w ͷ/'$Ξμϓλʔ ίϯτϩʔϥ Λૢ࡞͢ΔͨΊͷΫϥε ͜ΕͰσϑΥϧτͷΞμϓλʔΛऔಘͰ͖·͢ ˣ val nfcAdapter =
NfcAdapter.getDefaultAdapter(activity) ˞BDUJWJUZ$PNQPOFOU"DUJWJUZ
ϦʔμʔϞʔυʹ੍ݶ w ಡΈऔΓॻ͖ࠐΈͱͯ͠ͷΈಈ࡞ͤ͞Δ nfcAdapter.enableReaderMode(activity, readerCallback, flag, null)
FOBCMF3FBEFS.PEFͷҾ Ҿ આ໌ ͨ͠ͷ BDUJWJUZ "DUJWJUZΛ͍͍ͤ $PNQPOFOU"DUJWJUZ DBMMCBDL ಡΈऔΓͰ͖ͨ࣌ʹΓ͍ͨॲཧΛ ͍͍ͤ
/GD"EBQUFS3FBEFS$BMMCBDL fl BHT /'$ͷछྨΛ͍͍ͤ /GD"EBQUFS'-"(@3&"%&3@/'$@ " FYUSBT ϦʔμʔϞʔυઃఆ༻ͷՃΦϓγ ϣϯ OVMM
/'$ λά /%&' ಡΈऔΓॻ͖ࠐΈ ͜ͷ෦Λ0/ʹͨ͠
/EFG3FDPSE w 63*ͷ/EFGϨίʔυΛ࡞ val uriRecord = NdefRecord.createUri(inputText.toUri()) ˞JOQVU5FYU4USJOHܕͰ͋ΓɺςΩετϑΟʔϧυ͔Βೖྗͨ͠ͷ
/EFG.FTTBHF w /EFG.FTTBHFΛ࡞ val message = NdefMessage(arrayOf(uriRecord)) ˞VSJ3FDPSE/EFG3FDPSEDSFBUF6SJͰ࡞ͨ͠ͷ
/'$ λά /%&' ಡΈऔΓॻ͖ࠐΈ ͜ΕΛ࡞ͨ͠
/%&'ϝοηʔδΛ࡞ͬͨͷͰ ॻ͖ࠐΉ
ॻ͖ࠐΈઌͷλάऔಘ NfcAdapter.ReaderCallback { tag: Tag? -> }
खॱ ಡΈࠐΜͩλάͷ/%&'ΛऔಘWBMOEFG/EFGHFU UBH ಡΈऔΓॻ͖ࠐΈΛ༗ޮԽOEFGDPOOFDU ಡΈࠐΜͩ/%&'ͷ/%&'ϝοηʔδʹ্ॻ͖
OEFGXSJUF/EFG.FTTBHF NFTTBHF ಡΈऔΓॻ͖ࠐΈΛແޮԽOEFGDMPTF
͋ͱɺεϚϗΛ͔ͯ͟͠ ॻ͖ࠐΉ͚ͩʂ 🎉
·ͱΊ w ॻ͖ࠐΈ͍ͨ͜ͱΛ/%&'ϑΥʔϚοτʹͯ͠ॻ͖ࠐΊΔ w "OESPJE1MBUGPSN"1*ͳͷͰಛʹϥΠϒϥϦΛՃ͠ͳ͍͍ͯ͘ w ਫΛങ͏ͷָ͕͘͠ͳΓ·ͨ͠ʂ w طଘͷΞϓϦ͋Δ͚ͲɺࣗͷڵຯͰษڧ͢Δͷָ͍͠
ϦϙδτϦ