如何接收其他应用的推送通知?

Jas*_*ole 11 notifications push ios pebble-watch

你们大多数人都可能知道鹅卵石手表,这款手表会收到你手机推送通知.

他们能够接收一些通知.

  • 来电来电显示
  • 电子邮件(Gmail或任何IMAP电子邮件帐户)
  • Android和iPhone上的短信
  • iMessage(仅限iOS)
  • 日历提醒
  • Facebook消息
  • 推特
  • 天气警报
  • 静音振动报警和定时器

我怎么能这样做?也许他们使用facebook api或类似的东西写了一些他们自己的通知.但是如何用短信和电话做到这一点?

你能收到什么通知?

Ram*_*Ram 8

Pebble使用蓝牙与智能手机进行通信.请找到iPhone(iOS6)和相关链接的答案.

Incoming Caller ID                                 CoreTelephony Framewerk
Run Code Online (Sandbox Code Playgroud)

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

您必须使用PBAP在蓝牙设备上显示callerID,并且设备必须是MFi才能与iPhone应用程序通信.

Email (Gmail or any IMAP email account)            PushNotifications 
SMS and iMessage                                   PushNotifications with MAP
Run Code Online (Sandbox Code Playgroud)

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

Calendar Alerts                                    EVentKit Framework
Run Code Online (Sandbox Code Playgroud)

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

Facebook Messages                                  Social Framework
Twitter                                            Social Framework
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

以下代码可用于振动iPhone

添加AudioToolbox框架工作导入AudioServices.h

AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);


mat*_*way 3

它使用蓝牙并通过蓝牙进行通信来访问所有数据。它没有做任何花哨的事情。然而,所有这些数据都来自操作系统,而不是来自设备上的应用程序。

回答您的问题 - 无法在您自己的应用程序中获取所有这些通知。您可以使用 CoreTelephony 访问一些与来电相关的数据,并且可以集成 Facebook 和 Twitter API 来获取这些数据,但实际上这一切都必须自己完成。不幸的是,这里没有灵丹妙药!