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
470
Dagger2 Optional bindings
funnelbit
0
540
WearableRecyclerView
funnelbit
1
770
QucikSettingsTileAPI
funnelbit
0
350
Mobile Vision
funnelbit
0
440
AwarenessAPI
funnelbit
0
130
Other Decks in Technology
See All in Technology
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
32k
ブラックフライデーで購入したPixel9で、Gemini Nanoを動かしてみた
marchin1989
1
520
権威ドキュメントで振り返る2024 #年忘れセキュリティ2024
hirotomotaguchi
2
740
LINEヤフーのフロントエンド組織・体制の紹介【24年12月】
lycorp_recruit_jp
0
530
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
210
コンテナセキュリティのためのLandlock入門
nullpo_head
2
320
AIのコンプラは何故しんどい?
shujisado
1
190
Storage Browser for Amazon S3
miu_crescent
1
140
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
280
podman_update_2024-12
orimanabu
1
270
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Documentation Writing (for coders)
carmenintech
66
4.5k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
4 Signs Your Business is Dying
shpigford
181
21k
A better future with KSS
kneath
238
17k
Why Our Code Smells
bkeepers
PRO
335
57k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
How to train your dragon (web standard)
notwaldorf
88
5.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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
͋Γ͕ͱ͏͍͟͝·ͨ͠