Slide 1

Slide 1 text

/FBSCZ.FTTBHFT "1* JEGVOOFMCJU ๺ଜɹྋ

Slide 2

Slide 2 text

͜Μʹͪ͸ w JEGVOOFMCJU w ๺ଜɹྋ w BOESPJEΞϓϦ୲౰

Slide 3

Slide 3 text

/FBSCZ

Slide 4

Slide 4 text

/FBSCZ w ۙ͘ʹ͍ΔσόΠεͱ઀ଓͯ͠΍ΓͱΓͰ͖Δ w /FBSCZ$POOFDUJPOT"1* w /FBSCZ.FTTBHFT"1*

Slide 5

Slide 5 text

/FBSCZ$POOFDUJPOT"1* w ϩʔΧϧωοτϫʔΫܦ༝Ͱ઀ଓ w ૉૣ͍௨৴ w ϚϧνϓϨΠήʔϜͳͲʹ࢖͑Δ

Slide 6

Slide 6 text

w XJp CMVFUPPUI ௒Ի೾Ͱۙ͘ͷσόΠεΛൃݟ ͠ϖΞϦϯά w Πϯλʔωοτ઀ଓඞਢ w (PPHMF1MBZ4FSWJDFTd w J04Ͱ΋࢖͑Δ w ࠓ೔࿩͢ͷ͸ͪ͜ΒͰ͢ /FBSCZ.FTTBHFT"1*

Slide 7

Slide 7 text

࢓૊Έ w 5PLFOΛ࡞Γɺ௒Ի೾΍8Jp΍CMVFUPPUIΛ࢖͍ɺ ަ׵͢Δ͜ͱͰ઀ଓঢ়ଶΛ࡞Δ w ઀ଓঢ়ଶΛ࡞ͬͨΒQVCMJTIঢ়ଶͷϝοηʔδ͕ ಧ͘ w ΍ΓͱΓ͸ΠϯλʔωοτΛܦ༝

Slide 8

Slide 8 text

/FBSCZ.FTTBHFT"1* Nearby.Messages_API nearby.messages.Message nearby.messages.Strategy Nearby.Messages.publish Nearby.Messages.unpublish Nearby.Messages.subscribe Nearby.Messages.unsubscribe

Slide 9

Slide 9 text

w (PPHMF"QJ$MJFOU#VJMEFSʹ౉͢ఆ਺ mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Nearby.MESSAGES_API)
 .addConnectionCallbacks(this)
 .addOnConnectionFailedListener(this)
 .build(); /FBSCZ.FTTBHFT@"1*

Slide 10

Slide 10 text

OFBSCZNFTTBHFT.FTTBHF w ௨৴಺༰Λද͢Ϋϥε w CZUF·Ͱ w QVCMJD.FTTBHF CZUF<>DPOUFOU w QVCMJD.FTTBHF CZUF<>DPOUFOU 4USJOHUZQF

Slide 11

Slide 11 text

OFBSCZNFTTBHFT4USBUFHZ Strategy mStrategy = new Strategy.Builder()
 .setTtlSeconds(Constants.TTL_IN_SECONDS) .build(); w ϝοηʔδͷ༗ޮڑ཭΍༗ޮظݶΛઃఆͰ͖Δ

Slide 12

Slide 12 text

/FBSCZ.FTTBHFTQVCMJTI Nearby.Messages.publish( mGoogleApiClient, mMessage, mStrategy); w ϝοηʔδΛQVCMJTI͢Δ w ड৴ଆͷ୺຤Ͱ͸PO'PVOE͕ݺ͹ΕΔ Nearby.Messages.publish( mGoogleApiClient, mMessage);

Slide 13

Slide 13 text

Nearby.Messages.unpublish( mGoogleApiClient, mMessage); w QVCMJTIࡁΈͷϝοηʔδΛ࡟আ͢Δ w ड৴ଆͷ୺຤Ͱ͸PO-PTU͕ݺ͹ΕΔ /FBSCZ.FTTBHFTVOQVCMJTI

Slide 14

Slide 14 text

/FBSCZ.FTTBHFTTVCTDSJCF Nearby.Messages.subscribe( mGoogleApiClient, new MessageListener(), mStrategy); ߪಡதͷঢ়ଶʹ͢Δ Πϕϯτ͕ൃੜͨ͠Β.FTTBHF-JTUFOFS͕ݺ͹ΕΔ Nearby.Messages.subscribe( mGoogleApiClient, new MessageListener(), mStrategy, new MessageFilter());

Slide 15

Slide 15 text

.FTTBHF-JTUFOFS MessageListener mMessageListener = new MessageListener() {
 @Override
 public void onFound(final Message message) {
 …
 }
 @Override
 public void onLost(final Message message) {
 …
 }
 }; ϝοηʔδͷมߋΛड͚औΔ

Slide 16

Slide 16 text

/FBSCZ.FTTBHFTVOTVCTDSJCF Nearby.Messages.unsubscribe( mGoogleApiClient, mMessageListener); ߪಡதͷঢ়ଶΛղআ͢Δ

Slide 17

Slide 17 text

·ͱΊ w ໘ന͍ w Θ͔Βͳ͍͜ͱଟ͍ w ௒Ի೾ͱ8Jpͱ#MVFUPPUIͷ࢖͍෼͚ w ͲΕ͙Β͍ͰϖΞϦϯά੾ΕΔͷ͔ w Կʹ࢖͏ͷ͕ྑ͍ͷ͔ w ࠓޙ࢓૊Έ͕มΘΔ͔΋͠Εͳ͍

Slide 18

Slide 18 text

ৄࡉ w /FBSCZ.FTTBHFT"1* w IUUQTEFWFMPQFSTHPPHMFDPNOFBSCZ NFTTBHFTPWFSWJFX

Slide 19

Slide 19 text

͋Γ͕ͱ͏͍͟͝·ͨ͠