View
177
Download
0
Category
Preview:
DESCRIPTION
ANCSとAndroid Wear徹底比較
Citation preview
ANCSとAndroid Wear 徹底比較
GClue, Inc. 佐々木 陽
2014/3/27
Aka Beacon
ANCS Dev Kit
ANCS Akabeko
Aka Beacon Kit
BLEガジェット勉強会https://www.facebook.com/groups/725670950801157/
はじめに
Appcessory
http://www.juniperresearch.com/viewpressrelease.php?pr=414Juniper
https://www.abiresearch.com/press/wearable-computing-devices-like-apples-iwatch-willABI 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
IoT
Next big thing
3200億円でGoogleが買収
Nest Oculus
2000億円でFacebookが買収
Next big thingは AppcessoryやConnectedハードウェア
の分野からでてくる?!
HardwareWifi
Bluetooth
BLE
HardwareWifi Bluetooth BLE
hue TEPRA-Print SDK
Socket 7Xi RC-S390
Dice+
ANCSとAndroid Wear
ANCSって何?Apple Notification Center Service (ANCS)
ANCSの目的は、BLEを通してiOSと接続されたアクセサリに、iOSで発生する様々なNotificationを通知する仕組み
ANCSのデザイン3原則 - Simplicity(簡潔的) - Efficiency(効率的) - Scalability(スケーラビリティ)
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.
- 体に装着した、小さくパワフルなデバイス群。 - あなたがより情報を必要とする時の便利な情報。 - 音声での質問にこたえるインテリジェントな応答。 - フィットネスの成功を手助けするツール。 - マルチスクリーンワールドへのキー。
ANCS対応製品
STB-1000 Fitbit Pebble
Smart Light
Android Wear対応製品
G Watch MOTO 360
通信方式ANCS Android Wear
方式 BLE 規定はしていない BLE or Bluetooth
データ通信ANCS Android Wear
方式 GATT (Notify) Intent
できる事比較Notification
ANCS
Notification
Android Wear
スマフォ操作音声入力
2:30
Ddconnect
ANCS発動条件Notificationメッセージ
UILocalNotificationApple Push Notification Service
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連携
ANCSの仕組み
通常のBLEハード
BLEハードウェア
Notify
Service 任意のUUID
Characterristic1 任意のUUID1Characterristic2 任意のUUID2
BLEハード
Connected
Connect
Read/Write
Central Peripheral
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
ServiceUUID 7905F431-B5CE-4E99-A40F-4B1E122D00D0
検索できるCharacteristic0x2800
0x2803
69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D90x2900
9FBF120D-6301-42D9-8C58-25E699A21DBD0x2902
22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB
Characterristic UUID TypeControl Point 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 writeable with responseNotification Source 9FBF120D-6301-42D9-8C58-25E699A21DBD notifiableData Source 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB notifiable
0x2803
0x2902
0x2803GATT Primary Service DeclarationGATT Characteristic Declaration
GATT Characteristic Declaration
GATT Characteristic Declaration
Characteristic Extended Properties
Client Characteristic Configuration
Notification SourceClient Characteristic Configuration
Control Point
Data Source
UUDI 7905F431-B5CE-4E99-A40F-4B1E122D00D0
service 検索
ANCS
*Notification*
Notification SourceUID=3
Control Point
UID=3 Attribute=Titile, Message, AppID
着信などの通知
着信リクセスト
情報取得
Data Source
UID=3 Title=“William T. Riker”
Message = “Incoming FaceTime” AppID=“com.apple.facetime”
電話が着信
Notification Sourceバイト数 処理概要
EventID 1 Bytes iOS notificationが追加(0)/修正(1)/削除(2)EventFlag 1 Bytes 重要度を示すEventFlagSilent(1 << 0), EventFlagImportant(1 << 1)CategoryID 1 Bytes カテゴリIDCategoryCount 1 BytesNotificationUID 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
例)
Control PointID バイト数 概要
CommandID 1 Bytes 0
NotificaionUID 2 Bytes 32ビットの数値の値
AttributeIDs 任意のBytes AttributeIDs, Max Length
例)
Data SourceID バイト数 概要
CommandID 1 Bytes 1
NotificationUID 2 Bytes アプリのパッケージ名
AttributeIDs 任意のBytes AttributeIDs, Attributes
Android Wearの仕組み
Notification
Notification2: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());
スマフォ操作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());
音声入力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>
最後に
早くハードウェア仕様が 開示されるといいなぁ。
Recommended