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
360
NearByMessagesApi
funnelbit
August 27, 2015
Tweet
Share
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.2k
droidkaigi-2017-renovation
funnelbit
10
10k
Dart
funnelbit
0
250
BottomBarAndSnackBar
funnelbit
0
460
Dagger2 Optional bindings
funnelbit
0
530
WearableRecyclerView
funnelbit
1
770
QucikSettingsTileAPI
funnelbit
0
340
Mobile Vision
funnelbit
0
430
AwarenessAPI
funnelbit
0
130
Other Decks in Technology
See All in Technology
TypeScript、上達の瞬間
sadnessojisan
46
13k
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
190
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
170
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
Terraform CI/CD パイプラインにおける AWS CodeCommit の代替手段
hiyanger
1
240
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
180
[CV勉強会@関東 ECCV2024 読み会] オンラインマッピング x トラッキング MapTracker: Tracking with Strided Memory Fusion for Consistent Vector HD Mapping (Chen+, ECCV24)
abemii
0
220
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
150
Featured
See All Featured
What's new in Ruby 2.0
geeforr
343
31k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Into the Great Unknown - MozCon
thekraken
32
1.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Building Applications with DynamoDB
mza
90
6.1k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Six Lessons from altMBA
skipperchong
27
3.5k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Raft: Consensus for Rubyists
vanstee
136
6.6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
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
͋Γ͕ͱ͏͍͟͝·ͨ͠