ancsとandroid wear徹底比較

36
ANCSとAndroid Wear 徹底比較 GClue, Inc. 佐々木 陽 2014/3/27

Upload: akira-sasaki

Post on 28-Jan-2015

178 views

Category:

Technology


0 download

DESCRIPTION

ANCSとAndroid Wear徹底比較

TRANSCRIPT

Page 1: ANCSとAndroid Wear徹底比較

ANCSとAndroid Wear 徹底比較

GClue, Inc. 佐々木 陽

2014/3/27

Page 2: ANCSとAndroid Wear徹底比較

Aka Beacon

Page 3: ANCSとAndroid Wear徹底比較

ANCS Dev Kit

Page 4: ANCSとAndroid Wear徹底比較

ANCS Akabeko

Page 5: ANCSとAndroid Wear徹底比較

Aka Beacon Kit

Page 6: ANCSとAndroid Wear徹底比較

BLEガジェット勉強会https://www.facebook.com/groups/725670950801157/

Page 7: ANCSとAndroid Wear徹底比較

はじめに

Page 8: ANCSとAndroid Wear徹底比較

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

Page 9: ANCSとAndroid Wear徹底比較

IoT

Page 10: ANCSとAndroid Wear徹底比較

Next big thing

3200億円でGoogleが買収

Nest Oculus

2000億円でFacebookが買収

Next big thingは AppcessoryやConnectedハードウェア

の分野からでてくる?!

Page 11: ANCSとAndroid Wear徹底比較

HardwareWifi

Bluetooth

BLE

Page 12: ANCSとAndroid Wear徹底比較

HardwareWifi Bluetooth BLE

hue TEPRA-Print SDK

Socket 7Xi RC-S390

Dice+

Page 13: ANCSとAndroid Wear徹底比較

ANCSとAndroid Wear

Page 14: ANCSとAndroid Wear徹底比較

ANCSって何?Apple Notification Center Service (ANCS)

ANCSの目的は、BLEを通してiOSと接続されたアクセサリに、iOSで発生する様々なNotificationを通知する仕組み

ANCSのデザイン3原則 - Simplicity(簡潔的) - Efficiency(効率的) - Scalability(スケーラビリティ)

Page 15: ANCSとAndroid Wear徹底比較

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.

- 体に装着した、小さくパワフルなデバイス群。 - あなたがより情報を必要とする時の便利な情報。 - 音声での質問にこたえるインテリジェントな応答。 - フィットネスの成功を手助けするツール。 - マルチスクリーンワールドへのキー。

Page 16: ANCSとAndroid Wear徹底比較

ANCS対応製品

STB-1000 Fitbit Pebble

Smart Light

Page 17: ANCSとAndroid Wear徹底比較

Android Wear対応製品

G Watch MOTO 360

Page 18: ANCSとAndroid Wear徹底比較

通信方式ANCS Android Wear

方式 BLE 規定はしていない BLE or Bluetooth

Page 19: ANCSとAndroid Wear徹底比較

データ通信ANCS Android Wear

方式 GATT (Notify) Intent

Page 20: ANCSとAndroid Wear徹底比較

できる事比較Notification

ANCS

Notification

Android Wear

スマフォ操作音声入力

2:30

Ddconnect

Page 21: ANCSとAndroid Wear徹底比較

ANCS発動条件Notificationメッセージ

UILocalNotificationApple Push Notification Service

Page 22: ANCSとAndroid Wear徹底比較

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連携

Page 23: ANCSとAndroid Wear徹底比較

ANCSの仕組み

Page 24: ANCSとAndroid Wear徹底比較

通常のBLEハード

BLEハードウェア

Notify

Service 任意のUUID

Characterristic1 任意のUUID1Characterristic2 任意のUUID2

BLEハード

Connected

Connect

Read/Write

Central Peripheral

Page 25: ANCSとAndroid Wear徹底比較

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

Page 26: ANCSとAndroid Wear徹底比較

ServiceUUID 7905F431-B5CE-4E99-A40F-4B1E122D00D0

Page 27: ANCSとAndroid Wear徹底比較

検索できる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 検索

Page 28: ANCSとAndroid Wear徹底比較

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”

電話が着信

Page 29: ANCSとAndroid Wear徹底比較

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

例)

Page 30: ANCSとAndroid Wear徹底比較

Control PointID バイト数 概要

CommandID 1 Bytes 0

NotificaionUID 2 Bytes 32ビットの数値の値

AttributeIDs 任意のBytes AttributeIDs, Max Length

例)

Page 31: ANCSとAndroid Wear徹底比較

Data SourceID バイト数 概要

CommandID 1 Bytes 1

NotificationUID 2 Bytes アプリのパッケージ名

AttributeIDs 任意のBytes AttributeIDs, Attributes

Page 32: ANCSとAndroid Wear徹底比較

Android Wearの仕組み

Page 33: ANCSと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());

Page 34: ANCSとAndroid Wear徹底比較

スマフォ操作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());

Page 35: ANCSとAndroid Wear徹底比較

音声入力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>

Page 36: ANCSとAndroid Wear徹底比較

最後に

早くハードウェア仕様が 開示されるといいなぁ。