Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
268 views
in Technique[技术] by (71.8m points)

ios - How can I receive push notifications of an other app?

Most of you guys may know the pebble watch, this watch receives push notifictions of you phone.

They are capable of receiving some notifications.

  • Incoming Caller ID
  • Email (Gmail or any IMAP email account)
  • SMS on both Android and iPhones
  • iMessage (iOS only)
  • Calendar Alerts
  • Facebook Messages
  • Twitter
  • Weather Alerts
  • Silent vibrating alarm and timer

How can I do the same? Maybe they wrote some notifications their self using the facebook api or somthing like that. But how to do this with sms and calls?

What notifications are you able to catch?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Pebble uses Bluetooth to communicate with smartphone.Please find the answers for iPhone(iOS6) and relevant links.

Incoming Caller ID                                 CoreTelephony Framewerk

http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Reference/CoreTelephonyFrameworkReference/_index.html

You have to use PBAP to show the callerID on the bluetooth device and the device has to be MFi to communicate with iPhone app.

Email (Gmail or any IMAP email account)            PushNotifications 
SMS and iMessage                                   PushNotifications with MAP

https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html

Calendar Alerts                                    EVentKit Framework

http://developer.apple.com/library/ios/#documentation/EventKit/Reference/EventKitFrameworkRef/_index.html

Facebook Messages                                  Social Framework
Twitter                                            Social Framework

http://developer.apple.com/library/ios/#documentation/Social/Reference/Social_Framework/_index.html#//apple_ref/doc/uid/TP40012233

Weather Alerts                         Any weather API from yahoo or MSN

Following code can be used to vibrate iPhone

Add AudioToolbox frame work import AudioServices.h

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...