知道应用程序是否从服务器端收到通知 [英] Know if the app received the notification from server side

查看:87
本文介绍了知道应用程序是否从服务器端收到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个类似于报纸的应用,我想知道有多少人收到了该文章的推送通知实际阅读了多少.

I'm building a newspaper-like app and I would like to know how many people received the article's push notification vs how many actually read it.

我正在考虑实现一种方法,当收到通知时,应用会唤醒并向服务器发送请求,说"您好,我是_____,我已收到关于____ <的通知./strong>"并将其存储在数据库中.然后,如果用户单击通知并阅读该文章,我将发送另一个请求,说"我是____,我已经阅读了文章_____ ",并且还将其存储在数据库中.之后,通过一些查询,我就能了解已读/已接收的百分比.

I was thinking to implement a way in which when the notification is received the app wakes up and send a request to the server saying "Hi I'm _____, I've received the notification of the article ____" and store it in the database. Then afterwards if the user click on the notification and goes to read the article I send another request saying "Hi I'm ____ and I've read the article _____" and I also store it on the database. Afterwards with some queries I'm able to understand the percentage read/received.

我不知道即使用户暂时没有打开应用并向服务器发送请求,它是否也有可能唤醒应用 (对于后台意味着该应用程序未启动还是在缓存中?).

I don't understand if it's even possible to wake up the app even if it was not opened by the user in a while and send a request to the server (for background is meant that the application is not launched or that is in the cache ?).

我想实现他们对Whatsapp所做的一切:

I would like to achieve what they did with Whatsapp:

  • 我在Whatsapp上收到一条新消息
  • 我没有打开应用
  • 我转到WhatsApp网站
  • 我在WhatsApp Web上打开对话
  • 徽章和电话上的通知消失了,因为我在其他地方读过

我认为该功能是通过无提示推送通知实现的,该通知仅更新应用程序徽章并清除读取的通知.

I think that that feature is achieved with silent push notifications that just update the app badge and clear the read notification.

推荐答案

Apple开发者技术支持的回复:

Reply from Apple Developer Technical Support:

你好Matteo,

Hello Matteo,

感谢您与Apple开发人员技术支持(DTS)联系.我们的工程师已经审核了您的要求,并得出结论,鉴于当前的运输系统配置,没有支持的方法来实现所需的功能.

Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.

所以在游戏结束时是不可能的

So at the end of the games IT'S NOT POSSIBLE

这篇关于知道应用程序是否从服务器端收到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆