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
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
170
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
260
Forget efficiency – Become more productive without the stress
ufried
0
140
物価高なラスベガスでの過ごし方
zakky
0
380
Jr. Championsになって、強く連携しながらAWSをもっと使いたい!~AWSに対する期待と行動~
amixedcolor
0
190
スプリントゴールにチームの状態も設定する背景とその効果 / Team state in sprint goals why and impact
kakehashi
2
100
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
事業者間調整の行間を読む 調整の具体事例
sugiim
0
1.5k
バクラクにおける可観測性向上の取り組み
yuu26
3
420
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
740
AWS CodePipelineでコンテナアプリをデプロイした際に、古いイメージを自動で削除する
smt7174
1
100
Featured
See All Featured
Bash Introduction
62gerente
608
210k
How to Think Like a Performance Engineer
csswizardry
19
1.1k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Designing Experiences People Love
moore
138
23k
Git: the NoSQL Database
bkeepers
PRO
425
64k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Typedesign – Prime Four
hannesfritz
39
2.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
22k
Navigating Team Friction
lara
183
14k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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
͋Γ͕ͱ͏͍͟͝·ͨ͠