我有一个有很多用户的SAAS产品。iOS +安卓应用。
1)有没有办法查看有多少人开启了推送?
2)是否可以通过编程方式检查是否开启了推流?如果不是,那么我想触发另一种交流。
问题适用于iOS和安卓系统。
谢谢。
发布于 2019-06-23 01:26:04
ios的
你必须实现一个聪明的解决方案来完成这项工作。
起始点是标识权限用户。
作为这个响应:https://stackoverflow.com/a/44407514/6273003
之后,您可以将此信息与一些用户标识一起存储。
然后,当您决定通知时,您必须检查此信息。
PS :这个权限是动态的,正如@paulw11所说的那样。
发布于 2019-06-23 04:47:48
很抱歉,我的回答只涉及iOS部件
我认为你需要知道哪些用户收到通知消息,如果用户没有收到消息,就用alternative发送消息。
可以使用通知扩展(在iOS中)执行此操作
只需通过api请求添加发送投递状态(在您的服务中)
override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
let content = request.content
// send delivery status in your service
sendStatistic(content: request.content, onCompletion: {
// show push with default content
contentHandler(content)
})}
一些扩展指南
https://code.tutsplus.com/tutorials/ios-10-notification-service-extensions--cms-27550
有关extension https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension的详细信息
有关通知的更多信息
https://stackoverflow.com/questions/56710640
复制相似问题