Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
NearByConnectionsApi
Search
funnelbit
July 21, 2015
Technology
1
410
NearByConnectionsApi
funnelbit
July 21, 2015
Tweet
Share
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.1k
droidkaigi-2017-renovation
funnelbit
10
10k
Dart
funnelbit
0
250
BottomBarAndSnackBar
funnelbit
0
460
Dagger2 Optional bindings
funnelbit
0
530
WearableRecyclerView
funnelbit
1
760
QucikSettingsTileAPI
funnelbit
0
340
Mobile Vision
funnelbit
0
430
AwarenessAPI
funnelbit
0
130
Other Decks in Technology
See All in Technology
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.8k
初心者に Vue.js を 教えるには
tsukuha
5
390
プロダクトチームへのSystem Risk Records導入・運用事例の紹介/Introduction and Case Studies on Implementing and Operating System Risk Records for Product Teams
taddy_919
1
170
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
180
[AWS JAPAN 生成AIハッカソン] Dialog の紹介
yoshimi0227
0
150
使えそうで使われないCloudHSM
maikamibayashi
0
170
Autify Company Deck
autifyhq
1
39k
10分でわかるfreeeのQA
freee
1
3.4k
話題のGraphRAG、その可能性と課題を理解する
hide212131
4
1.5k
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.5k
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
Featured
See All Featured
Six Lessons from altMBA
skipperchong
26
3.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Building an army of robots
kneath
302
42k
Teambox: Starting and Learning
jrom
132
8.7k
KATA
mclloyd
29
13k
For a Future-Friendly Web
brad_frost
175
9.4k
We Have a Design System, Now What?
morganepeng
50
7.2k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
How to Ace a Technical Interview
jacobian
275
23k
How GitHub (no longer) Works
holman
311
140k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Transcript
/FBSCZ$POOFDUJPOT "1* JEGVOOFMCJU ଜɹྋ
͜Μʹͪ w JEGVOOFMCJU w ଜɹྋ w BOESPJE
ۙ͘ͷ ଞσόΠεͱͷ௨৴
ߟ͑ΒΕΔखஈ w CMVFUPPUIͰݕࡧɾ௨৴ w 23ίʔυͰσʔλΛ͢ w "OESPJE#FBNͰ௨৴ w ҐஔใͰ͓ޓ͍Λೝࣝͯ͠Կ͔Ͱ௨৴
໘ w ͱʹ͔͘ίετ͕͔͔Δ w ͋·ΓγʔϜϨεͰͳ͍ w ෳਓ͕૬खͩͬͨΒߋʹ໘ w ৗ࣌ଓ͢Δ߹ʁ
/FBSCZ
/FBSCZ w ۙ͘ʹ͍ΔσόΠεͱଓͯ͠ΓͱΓͰ͖Δ w /FBSCZ.FTTBHFT w /FBSCZ$POOFDUJPOT
w XJp CMVFUPPUI ਓؒʹฉ͑͜ͳ͍ԻͰ௨৴ w (PPHMF1MBZ4FSWJDFT ༧ఆ w J04Ͱ͑Δ
༧ఆ w Ұ෦ͷΞϓϦઌߦ࠾༻ /FBSCZ.FTTBHFT
/FBSCZ$POOFDUJPOT w ϩʔΧϧωοτϫʔΫܦ༝Ͱଓ w ϚϧνϓϨΠήʔϜͳͲʹ͑Δ w ͢Ͱʹར༻Մೳ w ࠓ͢ͷͪ͜ΒͰ͢
/FBSCZ$POOFDUJPOT"1* w (PPHMF1MBZ4FSWJDFT ͔Βར༻Մೳ w (PPHMF"QJ$MJFOUΛར༻ w ඞཁͳQFSNJTTJPO A"$$&44@/&5803,@45"5&AͷΈ
w ϩʔΧϧωοτϫʔΫͷଓඞਢ
Nearby.Connections.startAdvertising Nearby.Connections.startDiscovery Nearby.Connections.sendConnectionRequest Nearby.Connections.acceptConnectionRequest Nearby.Connections.rejectConnectionRequest Nearby.Connections.sendReliableMessage Nearby.Connections.sendUnreliableMessage … /FBSCZ$POOFDUJPOT"1*
w (PPHMF"QJ$MJFOU#VJMEFSʹ͢ఆ mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Nearby.CONNECTIONS_API) .build();
/FBSCZ$POOFDUJPOT@"1*
w ଞͷσόΠε͔ΒݕࡧՄೳͳঢ়ଶʹ͢Δ Nearby.Connections.startAdvertising(mGoogleApiClient, name, appMetadata, TIMEOUT_ADVERTISE, this).setResultCallback(new ResultCallback<Connections.StartAdvertisingResult>() { @Override
public void onResult(Connections.StartAdvertisingResult result) { // ͳʹ͔ } }); TUBSU"EWFSUJTJOH
w ଞͷσόΠεͷ୳ࡧΛ։࢝͢Δ Nearby.Connections.startDiscovery(mGoogleApiClient, serviceId, TIMEOUT_DISCOVER, this) .setResultCallback(new ResultCallback<Status>() { @Override
public void onResult(Status status) { // ͳʹ͔ } }); TUBSU%JTDPWFSZ
w ଞσόΠεʹଓϦΫΤετΛૹΔ Nearby.Connections.sendConnectionRequest(mGoogleApiClient , myName, endpointId, myPayload, new Connections.ConnectionResponseCallback() {
@Override public void onConnectionResponse(String endpointId, Status status, byte[] bytes) { mOtherEndpointId = endpointId; } }, this); TFOE$POOFDUJPO3FRVFTU
w ଓϦΫΤετΛڐՄ͠ɺଓঢ়ଶʹ͢Δ Nearby.Connections.acceptConnectionRequest(mGoogleApiClient , endpointId, payload, MainActivity.this) .setResultCallback(new ResultCallback<Status>() {
@Override public void onResult(Status status) { // ͳʹ͔ } }); BDDFQU$POOFDUJPO3FRVFTU
w ଓϦΫΤετΛڋ൱ Nearby.Connections.rejectConnectionRequest(mGoogleApiClient , endpointId); SFKFDU$POOFDUJPO3FRVFTU
w ϝοηʔδΛૹΔ CZUF w ࣮֬ʹ͍ͨ͠ϝοηʔδ͕͋Δͱ͖ʹ͏ w ҉߸Խ͞Εͳ͍ͷͰҙ Nearby.Connections.sendReliableMessage(mGoogleApiClient, mOtherEndpointId,
msg.getBytes()); TFOE3FMJBCMF.FTTBHF
w ෳͷѼઌʹૹΔ͜ͱͰ͖Δ List<String> mOtherEndpointIds; … Nearby.Connections.sendReliableMessage(mGoogleApiClient, mOtherEndpointIds, msg.getBytes()); TFOE3FMJBCMF.FTTBHF
Nearby.Connections.sendUnreliableMessage(mGoogleApiClient , mOtherEndpointId, msg.getBytes()); w TFOE3FMJBCMF.FTTBHFΑΓߴ w ૹ৴ՄೳαΠζ͕TFOE3FMJBCMF.FTTBHFΑΓ খ͍͞ w
ॏཁͰͳ͍ใΛසൟʹૹΔ߹ʹ༻ TFOE6OSFMJBCMF.FTTBHF
·ͱΊ w ৭ΜͳσόΠεͱίετͰܨ͛Δࣄ͕Մೳ w ໘ന͍ w (PPHMF1MBZ4FSWJDFT͑͞ೖΕΕ͑Δ
ৄࡉ w /FBSCZ$POOFDUJPOT"1* w IUUQTEFWFMPQFSTHPPHMFDPNOFBSCZ DPOOFDUJPOTPWFSWJFX
͋Γ͕ͱ͏͍͟͝·ͨ͠