Android Ware intro by GDG HK

6002ee051e03f0b762642ee7fafd111f?s=47 Zoom.Quiet
September 18, 2014

Android Ware intro by GDG HK

for 141018 DevFest Zhuhai

6002ee051e03f0b762642ee7fafd111f?s=128

Zoom.Quiet

September 18, 2014
Tweet

Transcript

  1. None
  2. #androidwear

  3. #androidwear

  4. #androidwear

  5. #androidwear

  6. #androidwear

  7. #androidwear

  8. #androidwear

  9. #androidwear

  10. #androidwear

  11. you talk to the wearable #androidwear

  12. actions #androidwear

  13. actions #androidwear

  14. the wearable talks to you actions #androidwear

  15. actions context #androidwear

  16. actions context #androidwear

  17. #androidwear

  18. Launched automatically #androidwear

  19. Glanceable #androidwear

  20. Suggest and demand #androidwear

  21. Zero or low interaction #androidwear

  22. #androidwear

  23. Notifications Apps #androidwear

  24. Notifications #androidwear

  25. #androidwear

  26. #androidwear

  27. #androidwear NO WORK REQUIRED

  28. #androidwear

  29. #androidwear NO WORK REQUIRED

  30. Replies Pages Stacks #androidwear

  31. Notifications #androidwear

  32. Apps #androidwear

  33. Send data Custom UI Voice Actions #androidwear

  34. #androidwear

  35. Node Data Message #androidwear

  36. PendingResult<GetConnectedNodesResult> getConnectedNodes(GoogleApiClient); client); Method public interface NodeListener { void onPeerConnected(Node

    peer); void onPeerDisconnected(Node peer); } Listener Node #androidwear
  37. PendingResult<SendMessageResult> sendMessage(GoogleApiClient client, String nodeId, String action, byte[] data); Method

    public interface MessageListener { void onMessageReceived(MessageEvent messageEvent); } Listener Message #androidwear
  38. PendingResult<DataItemResult> putDataItem(GoogleApiClient client, PutDataRequest request); PendingResult<DataItemResult> getDataItem(GoogleApiClient client, Uri uri);

    Methods public interface DataListener { void onDataChanged(DataEventBuffer dataEvents); } Listener Data #androidwear
  39. <service android:name=".MyListenerService" > <intent-filter> <action android:name="com.google.android.gms.wearable.BIND_LISTENER" /> </intent-filter> </service> Intent

    Filter public class MyListenerService extends WearableListenerService { ... } Service #androidwear
  40. Send data Custom UI Voice Actions #androidwear

  41. #androidwear

  42. #androidwear

  43. #androidwear

  44. dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.support:wearable:+' compile

    'com.google.android.gms:play-services-wearable:+' } build.gradle #androidwear
  45. #androidwear • BoxInsetLayout • Card Fragment • CircledImageView • ConfirmationActivity

    • DismissOverlayView • GridViewPager • GridPagerAdapter • FragmentGridPagerAdapter • WatchViewStub
  46. #androidwear • BoxInsetLayout • Card Fragment • CircledImageView • ConfirmationActivity

    • DismissOverlayView • GridViewPager • GridPagerAdapter • FragmentGridPagerAdapter • WatchViewStub
  47. #androidwear • BoxInsetLayout • Card Fragment • CircledImageView • ConfirmationActivity

    • DismissOverlayView • GridViewPager • GridPagerAdapter • FragmentGridPagerAdapter • WatchViewStub
  48. #androidwear • BoxInsetLayout • Card Fragment • CircledImageView • ConfirmationActivity

    • DismissOverlayView • GridViewPager • GridPagerAdapter • FragmentGridPagerAdapter • WatchViewStub
  49. Send data Custom UI Voice Actions #androidwear

  50. #androidwear

  51. <activity android:name="MyNoteActivity"> <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="com.google.android.voicesearch.SELF_NOTE" /> </intent-filter>

    </activity> System provided voice action #androidwear
  52. #androidwear • Call a car/taxi • Take a note •

    Set alarm • Set timer • Start/Stop a bike ride • Start/Stop a run • Start/Stop a workout • Show heart rate • Show step count
  53. <activity android:name="StartRunActivity" android:label="MyRunningApp"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />

    </intent-filter> </activity> App provided voice action #androidwear
  54. private void displaySpeechRecognizer() { Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,

    RecognizerIntent.LANGUAGE_MODEL_FREE_FORM); startActivityForResult(intent, SPEECH_REQUEST_CODE); } Speech Recognizer #androidwear
  55. Notifications Apps #androidwear

  56. What’s next? Getting Started with Android Wear developer.android.com/wear Design for

    Android Wear developer.android.com/design/wear #androidwear
  57. None
  58. None