Slide 1

Slide 1 text

A Quick look at ANCS (Apple Notification Center Service) Johnny Sung

Slide 2

Slide 2 text

聃铞➛㣔剤➃䌟"QQMF8BUDI

Slide 3

Slide 3 text

How about ?

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

不只 AndroidWear 其他 BLE 開發版也可以做

Slide 6

Slide 6 text

其實不只AndroidWear 其他BLE開發版也可以做 http://lukeberndt.com/wp-content/uploads/2014/09/ancs-1024x641.jpg

Slide 7

Slide 7 text

ANCS僽➊랃

Slide 8

Slide 8 text

ANCS = Apple Notification Center Service ANCS is to give Bluetooth accessories (that connect to iOS devices through a Bluetooth low-energy link) a simple and convenient way to access many kinds of notifications that are generated on iOS devices.

Slide 9

Slide 9 text

矦㋲闍♧♴ BLE 㛇劥嚌䙂

Slide 10

Slide 10 text

BLE 的⾓角⾊色

Slide 11

Slide 11 text

以 ANCS 為例 AndroidWear iPhone Notification Consumer (NC) Notification Provider (NP)

Slide 12

Slide 12 text

("55须俲穡圓

Slide 13

Slide 13 text

⟃"/$4捀⢿ ANCS Service 7905F431-B5CE-4E99-A40F-4B1E122D00D0 Notification Source Control Point Data Source 9FBF120D-6301-42D9-8C58-25E699A21DBD 69D1D8F3-45E1-49A8-9821-9BBDFDAAD9D9 22EAC6E9-24D6-4BB5-BE44-B36ACE7C7BFB (writeable) (notifiable) (notifiable)

Slide 14

Slide 14 text

Register Flow

Slide 15

Slide 15 text

Notification Source 回傳封包

Slide 16

Slide 16 text

• Notification Added = 0 • Notification Modified = 1 • Notification Removed = 2 EventID Notification Source

Slide 17

Slide 17 text

• Other = 0 • IncomingCall = 1 • MissedCall = 2 • Voicemail = 3 • Social = 4 • Schedule = 5 • Email = 6 • News = 7 • HealthAndFitness = 8 • BusinessAndFinance = 9 • Location = 10 • Entertainment = 11 CategoryID Notification Source

Slide 18

Slide 18 text

⡹䊺竤〳⟃荈䊹⨞♧⦐ ✫ ⵌ鸏酭 http://l8smartlight.com/

Slide 19

Slide 19 text

https://www.youtube.com/watch?v=is8KMmE5030 https://www.youtube.com/watch?v=GV21uziG_OM

Slide 20

Slide 20 text

麌⡲崩玑㕮

Slide 21

Slide 21 text

叆鑉䲀久鎝䜂

Slide 22

Slide 22 text

傳送 接收 叆鑉䲀久鎝䜂 0 0

Slide 23

Slide 23 text

傳送 AttributeID • AppIdentifier = 0 • Title = 1 • Subtitle = 2 • Message = 3 • MessageSize = 4 • Date = 5 0 叆鑉䲀久鎝䜂

Slide 24

Slide 24 text

接收 • AppIdentifier = 0 • Title = 1 • Subtitle = 2 • Message = 3 • MessageSize = 4 • Date = 5 "com.apple.AppStore" "已更新「Adobe Photoshop Mix」和其他 6 個應⽤用程式" "App Store" "20150324T225555" nil 36 AttributeID 0 叆鑉䲀久鎝䜂

Slide 25

Slide 25 text

範例 Request AttributeID • AppIdentifier = 0 • Title = 1 • Subtitle = 2 • Message = 3 • MessageSize = 4 • Date = 5 "com.JohnnyWorks.SHRS-Radio" "⺟母親像⽉月亮⼀一樣~古典逍遙遊祝全天下的媽媽,⺟母親節快樂!" "世新廣播電臺" "20150510T100002" nil 28 Response 叆鑉䲀久鎝䜂

Slide 26

Slide 26 text

叆鑉"QQそ珖

Slide 27

Slide 27 text

App Identifier = "com.apple.AppStore" 叆鑉"QQそ珖 傳送 接收 AttributeID • DisplayName = 0 1 1 Attribute Value = "App Store" App Identifier = 
 "com.apple.AppStore" 0 0 Attribute Length = 9 AttributeID = 0 AttributeID = 0

Slide 28

Slide 28 text

ANCS 注意事項 • 字串資料都會以 UTF-8 的編碼傳遞 • 數值資料都會以 Little-endian 的⽅方式傳遞

Slide 29

Slide 29 text

MessageHorn

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

AndroidWear⛳〳⟃䖎惐

Slide 33

Slide 33 text

References • Apple Notification Center Service (ANCS) Specification • https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/ AppleNotificationCenterServiceSpecification/Introduction/Introduction.html • Core Bluetooth Programming Guide • https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/ Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html • INDANCSClient • https://github.com/indragiek/INDANCSClient

Slide 34

Slide 34 text

https://www.facebook.com/groups/353660298163446/ 穿戴式裝置開發者社群 歡迎您的加⼊入