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
NearByMessagesApi
Search
funnelbit
August 27, 2015
Technology
0
350
NearByMessagesApi
funnelbit
August 27, 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
Shift-from-React-to-Vue
calm1205
3
1.3k
Amazon_CloudWatch_ログ異常検出_導入ガイド
tsujiba
4
1.6k
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
650
わたしとトラックポイント / TrackPoint tips
masahirokawahara
1
240
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
30万人が利用するチャットをFirebase Realtime DatabaseからActionCableへ移行する方法
ryosk7
5
350
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
200
生成AIとAWS CDKで実現! 自社ブログレビューの効率化
ymae
2
330
ネット広告に未来はあるか?「3rd Party Cookie廃止とPrivacy Sandboxの効果検証の裏側」 / third-party-cookie-privacy
cyberagentdevelopers
PRO
1
130
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
850
初心者に Vue.js を 教えるには
tsukuha
5
390
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
110
Featured
See All Featured
Designing Experiences People Love
moore
138
23k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
14
1.9k
Done Done
chrislema
181
16k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Code Review Best Practice
trishagee
64
17k
A Philosophy of Restraint
colly
203
16k
Teambox: Starting and Learning
jrom
132
8.7k
For a Future-Friendly Web
brad_frost
175
9.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Building Your Own Lightsaber
phodgson
102
6k
Embracing the Ebb and Flow
colly
84
4.4k
Transcript
/FBSCZ.FTTBHFT "1* JEGVOOFMCJU ଜɹྋ
͜Μʹͪ w JEGVOOFMCJU w ଜɹྋ w BOESPJEΞϓϦ୲
/FBSCZ
/FBSCZ w ۙ͘ʹ͍ΔσόΠεͱଓͯ͠ΓͱΓͰ͖Δ w /FBSCZ$POOFDUJPOT"1* w /FBSCZ.FTTBHFT"1*
/FBSCZ$POOFDUJPOT"1* w ϩʔΧϧωοτϫʔΫܦ༝Ͱଓ w ૉૣ͍௨৴ w ϚϧνϓϨΠήʔϜͳͲʹ͑Δ
w XJp CMVFUPPUI ԻͰۙ͘ͷσόΠεΛൃݟ ͠ϖΞϦϯά w Πϯλʔωοτଓඞਢ w (PPHMF1MBZ4FSWJDFTd w
J04Ͱ͑Δ w ࠓ͢ͷͪ͜ΒͰ͢ /FBSCZ.FTTBHFT"1*
Έ w 5PLFOΛ࡞ΓɺԻ8JpCMVFUPPUIΛ͍ɺ ަ͢Δ͜ͱͰଓঢ়ଶΛ࡞Δ w ଓঢ়ଶΛ࡞ͬͨΒQVCMJTIঢ়ଶͷϝοηʔδ͕ ಧ͘ w ΓͱΓΠϯλʔωοτΛܦ༝
/FBSCZ.FTTBHFT"1* Nearby.Messages_API nearby.messages.Message nearby.messages.Strategy Nearby.Messages.publish Nearby.Messages.unpublish Nearby.Messages.subscribe Nearby.Messages.unsubscribe
w (PPHMF"QJ$MJFOU#VJMEFSʹ͢ఆ mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Nearby.MESSAGES_API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build();
/FBSCZ.FTTBHFT@"1*
OFBSCZNFTTBHFT.FTTBHF w ௨৴༰Λද͢Ϋϥε w CZUF·Ͱ w QVCMJD.FTTBHF CZUF<>DPOUFOU w
QVCMJD.FTTBHF CZUF<>DPOUFOU 4USJOHUZQF
OFBSCZNFTTBHFT4USBUFHZ Strategy mStrategy = new Strategy.Builder() .setTtlSeconds(Constants.TTL_IN_SECONDS) .build(); w ϝοηʔδͷ༗ޮڑ༗ޮظݶΛઃఆͰ͖Δ
/FBSCZ.FTTBHFTQVCMJTI Nearby.Messages.publish( mGoogleApiClient, mMessage, mStrategy); w ϝοηʔδΛQVCMJTI͢Δ w ड৴ଆͷͰPO'PVOE͕ݺΕΔ Nearby.Messages.publish(
mGoogleApiClient, mMessage);
Nearby.Messages.unpublish( mGoogleApiClient, mMessage); w QVCMJTIࡁΈͷϝοηʔδΛআ͢Δ w ड৴ଆͷͰPO-PTU͕ݺΕΔ /FBSCZ.FTTBHFTVOQVCMJTI
/FBSCZ.FTTBHFTTVCTDSJCF Nearby.Messages.subscribe( mGoogleApiClient, new MessageListener(), mStrategy); ߪಡதͷঢ়ଶʹ͢Δ Πϕϯτ͕ൃੜͨ͠Β.FTTBHF-JTUFOFS͕ݺΕΔ Nearby.Messages.subscribe( mGoogleApiClient,
new MessageListener(), mStrategy, new MessageFilter());
.FTTBHF-JTUFOFS MessageListener mMessageListener = new MessageListener() { @Override public void
onFound(final Message message) { … } @Override public void onLost(final Message message) { … } }; ϝοηʔδͷมߋΛड͚औΔ
/FBSCZ.FTTBHFTVOTVCTDSJCF Nearby.Messages.unsubscribe( mGoogleApiClient, mMessageListener); ߪಡதͷঢ়ଶΛղআ͢Δ
·ͱΊ w ໘ന͍ w Θ͔Βͳ͍͜ͱଟ͍ w Իͱ8Jpͱ#MVFUPPUIͷ͍͚ w ͲΕ͙Β͍ͰϖΞϦϯάΕΔͷ͔ w
Կʹ͏ͷ͕ྑ͍ͷ͔ w ࠓޙΈ͕มΘΔ͔͠Εͳ͍
ৄࡉ w /FBSCZ.FTTBHFT"1* w IUUQTEFWFMPQFSTHPPHMFDPNOFBSCZ NFTTBHFTPWFSWJFX
͋Γ͕ͱ͏͍͟͝·ͨ͠