ANCSとAndroid Wear徹底比較

10,184 views
9,896 views

Published on

ANCSとAndroid Wear徹底比較

Published in: Technology
0 Comments
19 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
10,184
On SlideShare
0
From Embeds
0
Number of Embeds
2,771
Actions
Shares
0
Downloads
67
Comments
0
Likes
19
Embeds 0
No embeds

No notes for slide

ANCSとAndroid Wear徹底比較

  1. 1. ANCSとAndroid Wear 徹底比較 GClue, Inc. 佐々木 陽 2014/3/27
  2. 2. Aka Beacon
  3. 3. ANCS Dev Kit
  4. 4. ANCS Akabeko
  5. 5. Aka Beacon Kit
  6. 6. BLEガジェット勉強会 https://www.facebook.com/groups/725670950801157/
  7. 7. はじめに
  8. 8. Appcessory http://www.juniperresearch.com/viewpressrelease.php?pr=414 Juniper https://www.abiresearch.com/press/wearable-computing-devices-like-apples-iwatch-will ABI Research 2014年 1000万台 2018年 4億8400万台 ABI Research Cisco 累計出荷台数 年間出荷台数 2018年 1億7000万台 Juniper http://www.cisco.com/c/en/us/solutions/collateral/service-provider/visual-networking-index-vni/white_paper_c11-520862.html Cisco
  9. 9. IoT
  10. 10. Next big thing 3200億円でGoogleが買収 Nest Oculus 2000億円でFacebookが買収 Next big thingは AppcessoryやConnectedハードウェア の分野からでてくる?!
  11. 11. Hardware Wifi Bluetooth BLE
  12. 12. Hardware Wifi Bluetooth BLE hue TEPRA-Print SDK Socket 7Xi RC-S390 Dice+
  13. 13. ANCSとAndroid Wear
  14. 14. ANCSって何? Apple Notification Center Service (ANCS) ANCSの目的は、BLEを通してiOSと接続されたアクセサリに、iOS で発生する様々なNotificationを通知する仕組み ANCSのデザイン3原則 - Simplicity(簡潔的) - Efficiency(効率的) - Scalability(スケーラビリティ)
  15. 15. Android Wearって何? Small, powerful devices, worn on the body. Useful information when you need it most. Intelligent answers to spoken questions. Tools to help reach fitness goals. Your key to a multiscreen world. - 体に装着した、小さくパワフルなデバイス群。 
 - あなたがより情報を必要とする時の便利な情報。 - 音声での質問にこたえるインテリジェントな応答。 - フィットネスの成功を手助けするツール。 - マルチスクリーンワールドへのキー。
  16. 16. ANCS対応製品 STB-1000 Fitbit Pebble Smart Light
  17. 17. Android Wear対応製品 G Watch MOTO 360
  18. 18. 通信方式 ANCS Android Wear 方式 BLE 規定はしていない BLE or Bluetooth
  19. 19. データ通信 ANCS Android Wear 方式 GATT (Notify) Intent
  20. 20. できる事比較 Notification ANCS Notification Android Wear スマフォ操作 音声入力 2:30 Ddconnect
  21. 21. ANCS発動条件 Notificationメッセージ UILocalNotification Apple Push Notification Service
  22. 22. Android Wearは発動条件 Notification スマフォ操作 音声入力 2:30 Ddconnect int notificationId = 001; // Build intent for notification content Intent viewIntent = new Intent(this, ViewEventActivity.class); viewIntent.putExtra(EXTRA_EVENT_ID, eventId); PendingIntent viewPendingIntent = PendingIntent.getActivity(this, 0, viewIntent, 0); !NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent); !// Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); !// Build the notification and issues it with notification manager. notificationManager.notify(notificationId, notificationBuilder.build()); // Create intent for reply action Intent replyIntent = new Intent(this, ReplyActivity.class); PendingIntent replyPendingIntent = PendingIntent.getActivity(this, 0, replyIntent, 0); ! // Build the notification NotificationCompat.Builder replyNotificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_new_message) .setContentTitle("Message from Travis") .setContentText("I love key lime pie!") .setContentIntent(replyPendingIntent); ! // Create the remote input RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) .setLabel(replyLabel) .build(); ! // Create wearable notification and add remote input Notification replyNotification = new WearableNotifications.Builder(replyNotificationBuilder) .addRemoteInputForContentIntent(replyAction) .build(); Notification 音声入力 Intent連携
  23. 23. ANCSの仕組み
  24. 24. 通常のBLEハード BLEハードウェア Notify Service 任意のUUID Characterristic1 任意のUUID1 Characterristic2 任意のUUID2 BLEハード Connected Connect Read/Write Central Peripheral
  25. 25. ANCSの場合 BLEハードウェア Notify PeripheralとCentralが逆転 Service UUID 7905F431-B5CE-4E99-A40F-4B1E122D00D0 Characterristic UUID Type Notification Source 9FBF120D-6301-42D9-8C58-25E699A21DBD notifiable Control Point 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 writeable with response Data Source 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB notifiable Peripheral Central Read/Write
  26. 26. Service UUID 7905F431-B5CE-4E99-A40F-4B1E122D00D0
  27. 27. 検索できるCharacteristic 0x2800 0x2803 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 0x2900 9FBF120D-6301-42D9-8C58-25E699A21DBD 0x2902 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB Characterristic UUID Type Control Point 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 writeable with response Notification Source 9FBF120D-6301-42D9-8C58-25E699A21DBD notifiable Data Source 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB notifiable 0x2803 0x2902 0x2803 GATT Primary Service Declaration GATT Characteristic Declaration GATT Characteristic Declaration GATT Characteristic Declaration Characteristic Extended Properties Client Characteristic Configuration Notification Source Client Characteristic Configuration Control Point Data Source UUDI 7905F431-B5CE-4E99-A40F-4B1E122D00D0 service 検索
  28. 28. ANCS *Notification* Notification Source UID=3 Control Point UID=3 Attribute=Titile, Message, AppID 着信などの通知 着信リクセスト 情報取得 Data Source UID=3 Title= William T. Riker 
 Message = Incoming FaceTime 
 AppID= com.apple.facetime 電話が着信
  29. 29. Notification Sourceバイト数 処理概要 EventID 1 Bytes iOS notificationが追加(0)/修正(1)/削除(2) EventFlag 1 Bytes 重要度を示すEventFlagSilent(1 << 0), EventFlagImportant(1 << 1) CategoryID 1 Bytes カテゴリID CategoryCount 1 Bytes NotificationUID 4 Bytes カテゴリ名 カテゴリID アプリ CategoryIDOther 1 iMessage, フォトストリーム, APNS, UILocalNotification, GMail CategoryIDIncomingCall 2 FaceTime, 電話 CategoryIDMissedCall 3 CategoryIDVoicemail 4 Line, Facebook Messanger, Twitter !CategoryIDSchedule 5 リマインダー、カレンダー CategoryIDEmail 6 CategoryIDNews 7 CategoryIDHealthAndFitnett 8 CategoryIDBusinessAndFinance 9 CategoryIDLocation 10 CategoryIDEntertainment 11 例)
  30. 30. Control Point ID バイト数 概要 CommandID 1 Bytes 0 NotificaionUID 2 Bytes 32ビットの数値の値 AttributeIDs 任意のBytes AttributeIDs, Max Length 例)
  31. 31. Data Source ID バイト数 概要 CommandID 1 Bytes 1 NotificationUID 2 Bytes アプリのパッケージ名 AttributeIDs 任意のBytes AttributeIDs, Attributes
  32. 32. Android Wearの仕組み
  33. 33. Notification Notification 2:30 Ddconnect int notificationId = 001; // Build intent for notification content Intent viewIntent = new Intent(this, ViewEventActivity.class); viewIntent.putExtra(EXTRA_EVENT_ID, eventId); PendingIntent viewPendingIntent = PendingIntent.getActivity(this, 0, viewIntent, 0); !NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent); !// Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); !// Build the notification and issues it with notification manager. notificationManager.notify(notificationId, notificationBuilder.build());
  34. 34. スマフォ操作 Notification スマフォ操作 2:30 Ddconnect // Build an intent for an action to view a map Intent mapIntent = new Intent(Intent.ACTION_VIEW); Uri geoUri = Uri.parse("geo:0,0?q=" + Uri.encode(location)); mapIntent.setData(geoUri); PendingIntent mapPendingIntent = PendingIntent.getActivity(this, 0, mapIntent, 0); !NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent) .addAction(R.drawable.ic_map, getString(R.string.map), mapPendingIntent); !// Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); !// Build the notification and issues it with notification manager. notificationManager.notify(notificationId, notificationBuilder.build());
  35. 35. 音声入力 Notification スマフォ操作 音声入力 2:30 Ddconnect // Create intent for reply action Intent replyIntent = new Intent(this, ReplyActivity.class); PendingIntent replyPendingIntent = PendingIntent.getActivity(this, 0, replyIntent, 0); !// Build the notification NotificationCompat.Builder replyNotificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_new_message) .setContentTitle("Message from Travis") .setContentText("I love key lime pie!") .setContentIntent(replyPendingIntent); !// Create the remote input RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY) .setLabel(replyLabel) .build(); !// Create wearable notification and add remote input Notification replyNotification = new WearableNotifications.Builder(replyNotificationBuilder) .addRemoteInputForContentIntent(replyAction) .build(); <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="reply_choices"> <item>Yes</item> <item>No</item> <item>Maybe</item> </string-array> </resources>
  36. 36. 最後に 早くハードウェア仕様が 開示されるといいなぁ。

×