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
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
IBC 2024 動画技術関連レポート / IBC 2024 Report
cyberagentdevelopers
PRO
1
110
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
Lexical Analysis
shigashiyama
1
150
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Documentation Writing (for coders)
carmenintech
65
4.4k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Embracing the Ebb and Flow
colly
84
4.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Happy Clients
brianwarren
98
6.7k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Building Applications with DynamoDB
mza
90
6.1k
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
͋Γ͕ͱ͏͍͟͝·ͨ͠