$30 off During Our Annual Pro Sale. View Details »

Let's make Photo Frame with Android Things

Let's make Photo Frame with Android Things

Story about development for photo frame with Android Things.

Ryota Takemoto

March 22, 2017
Tweet

More Decks by Ryota Takemoto

Other Decks in Technology

Transcript

  1. Let’s make Photo Frame with Android Things Ryota Takemoto 3ZPUB5BLFNPUP

  2. !SOPNJ SOPNJ ஛ ݩ ɹ ྄ ଠ 5BLFNPUPɹ3ZPUB +PJO$ZCFS"HFOU 'SPOUFOE%FWFMPQFS

    ೥ ೥ʙ "OESPJEEFWFMPQFS!"8" ʢχΠϊϛʣ
  3. Android Things

  4. None
  5. What I made

  6. None
  7. None
  8. Setup

  9. IUUQTEFWFMPQFSBOESPJEDPNUIJOHT IBSEXBSFSBTQCFSSZQJIUNM

  10. Build on

  11. $ adb connect Android.local $ ./gradlew :app:assembleDebug

  12. Develop App

  13. API Using

  14. Getting AccessToken with OAuth on

  15. Getting AccessToken with OAuth on

  16. webView.loadUrl(url); Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent);

  17. Using Realtime Database

  18. IUUQTSJHHBSPPDP[BBOESPJEUIJOHTFMFDUSJDJUZNPOJUPSJOHBQQ Save Get AccessToken

  19. Setup Firebase IUUQTpSFCBTFHPPHMFDPNEPDTBOESPJETFUVQ

  20. Realtime Database rule

  21. Realtime Database rule for development

  22. FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference dbRef = database.getReference(“access_token"); dbRef.setValue(“xxx-yyy-zzz”); Save

    AccessToken app module
  23. “xxx-yyy-zzz” Saved successfully!!

  24. Get AccessToken things module dbRef.addValueEventListener(new ValueEventListener() { @Override public void

    onDataChange(DataSnapshot dataSnapshot) { String value = dataSnapshot.getValue(String.class); } @Override public void onCancelled(DatabaseError error) { // cancelled } });
  25. Get AccessToken things module dbRef.addValueEventListener(new ValueEventListener() { @Override public void

    onDataChange(DataSnapshot dataSnapshot) { String value = dataSnapshot.getValue(String.class); } @Override public void onCancelled(DatabaseError error) { // cancelled } }); value(AccessToken) is “xxx-yyy-zzz”
  26. Fetch contents app things

  27. IUUQTHJUIVCDPNSOPNJQJOCPBSE Demo App

  28. Thank you !SOPNJ SOPNJ