Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A Quick look at ANCS (Apple Notification Center Service)
Search
Johnny Sung
May 13, 2015
Programming
0
120
A Quick look at ANCS (Apple Notification Center Service)
快速看懂 ANCS 文件
Johnny Sung
May 13, 2015
Tweet
Share
More Decks by Johnny Sung
See All by Johnny Sung
[AI / ML] 用 LLM (Large language model) 來整理您的知識庫 @ Devfest Taipei 2023
j796160836
0
27
[Flutter] Flutter Provider 看似簡單卻又不簡單的狀態管理工具
j796160836
0
8
[Golang] 以 Mobile App 工程師視角,帶你進入 Golang 的世界 (Introduction of GoLang)
j796160836
0
6
[Flutter] 來體驗 bloc 小方塊的神奇魔法 @Devfest 2022
j796160836
0
190
與 Sign in with Apple 的愛恨情仇 @ iPlayground2020
j796160836
3
13k
Flutter 是什麼?用 Flutter 會省到時間嗎? @ GDG Devfest2020
j796160836
1
1.1k
談談 Android constraint layout
j796160836
0
71
炎炎夏日學 Android 課程 - Part3: Android app 實作
j796160836
0
52
炎炎夏日學 Android 課程 - Part2: Android 元件介紹
j796160836
0
52
Other Decks in Programming
See All in Programming
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.5k
PHPの次期バージョンはこの時期どうなっているのか - Internalsの開発体制について - PHPカンファレンス小田原
youkidearitai
PRO
1
190
Java 22 Overview
kishida
1
180
使ってみよう Azure AI Document Intelligence
kosmosebi
2
320
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
27
8.3k
GitHub Copilotのススメ
marcy731
1
200
Git Rebase
bkuhlmann
11
1.6k
Blue/Greenデプロイの導入による 運用フローの改善
kudoas
1
380
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
250
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
360
Featured
See All Featured
The Invisible Side of Design
smashingmag
294
49k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
227
16k
Producing Creativity
orderedlist
PRO
337
39k
WebSockets: Embracing the real-time Web
robhawkes
59
7k
Designing on Purpose - Digital PM Summit 2013
jponch
110
6.5k
How to train your dragon (web standard)
notwaldorf
73
5.2k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
14
1.6k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Side Projects
sachag
451
41k
How to Ace a Technical Interview
jacobian
272
22k
Happy Clients
brianwarren
92
6.4k
Transcript
A Quick look at ANCS (Apple Notification Center Service) Johnny
Sung
聃铞➛㣔剤➃䌟"QQMF8BUDI
How about ?
None
不只 AndroidWear 其他 BLE 開發版也可以做
其實不只AndroidWear 其他BLE開發版也可以做 http://lukeberndt.com/wp-content/uploads/2014/09/ancs-1024x641.jpg
ANCS僽➊랃
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.
矦㋲闍♧♴ BLE 㛇劥嚌䙂
BLE 的⾓角⾊色
以 ANCS 為例 AndroidWear iPhone Notification Consumer (NC) Notification Provider
(NP)
("55须俲穡圓
⟃"/$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)
Register Flow
Notification Source 回傳封包
• Notification Added = 0 • Notification Modified = 1
• Notification Removed = 2 EventID Notification Source
• 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
⡹䊺竤〳⟃荈䊹⨞♧⦐ ✫ ⵌ鸏酭 http://l8smartlight.com/
https://www.youtube.com/watch?v=is8KMmE5030 https://www.youtube.com/watch?v=GV21uziG_OM
麌⡲崩玑㕮
叆鑉䲀久鎝䜂
傳送 接收 叆鑉䲀久鎝䜂 0 0
傳送 AttributeID • AppIdentifier = 0 • Title = 1
• Subtitle = 2 • Message = 3 • MessageSize = 4 • Date = 5 0 叆鑉䲀久鎝䜂
接收 • 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 叆鑉䲀久鎝䜂
範例 Request AttributeID • AppIdentifier = 0 • Title =
1 • Subtitle = 2 • Message = 3 • MessageSize = 4 • Date = 5 "com.JohnnyWorks.SHRS-Radio" "⺟母親像⽉月亮⼀一樣~古典逍遙遊祝全天下的媽媽,⺟母親節快樂!" "世新廣播電臺" "20150510T100002" nil 28 Response 叆鑉䲀久鎝䜂
叆鑉"QQそ珖
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
ANCS 注意事項 • 字串資料都會以 UTF-8 的編碼傳遞 • 數值資料都會以 Little-endian 的⽅方式傳遞
MessageHorn
None
None
AndroidWear⛳〳⟃䖎惐
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
https://www.facebook.com/groups/353660298163446/ 穿戴式裝置開發者社群 歡迎您的加⼊入