Contenu connexe Similaire à A Quick look at ANCS (Apple Notification Center Service) Similaire à A Quick look at ANCS (Apple Notification Center Service) (20) A Quick look at ANCS (Apple Notification Center Service)1. A Quick look at ANCS
(Apple Notification Center Service)
Johnny Sung
8. 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.
16. • Notification Added = 0
• Notification Modified = 1
• Notification Removed = 2
EventIDNotification Source
17. • Other = 0
• IncomingCall = 1
• MissedCall = 2
• Voicemail = 3
• Social = 4
• Schedule = 5
• Email = 6
• News = 7
• HealthAndFitness = 8
• BusinessAndFinance = 9
• Location = 10
• Entertainment = 11
CategoryIDNotification Source
24. 接收
• 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
25. 範例
Request AttributeID
• AppIdentifier = 0
• Title = 1
• Subtitle = 2
• Message = 3
• MessageSize = 4
• Date = 5
"com.JohnnyWorks.SHRS-Radio"
"⺟母親像⽉月亮⼀一樣~古典逍遙遊祝全天下的媽媽,⺟母親節快樂!"
"世新廣播電臺"
"20150510T100002"
nil
28
Response
27. App Identifier = "com.apple.AppStore"
傳送
接收
AttributeID
• DisplayName = 01
1
Attribute Value = "App Store"
App Identifier =
"com.apple.AppStore"
0
0
Attribute Length = 9
AttributeID = 0
AttributeID = 0
33. 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