问题描述
我要实现推送通知的一个应用程序(包括iOS和Android),需要在以下场景澄清。
I want to implement Push Notification for an App (both iOS and Android) and need clarifications on the following scenarios.
我明白是怎么推送通知的工作原理和一般的限制。我看过的文档,但只是让我感到困惑,并没有回答我所有的问题。
I understand how the Push Notification works in general and the limitations. I did read the docs but that just got me confused and didnt answer all my questions.
如何在iOS和Android处理以下方案:
How are the following scenarios handled in iOS and Android:
- 当设备处于关闭状态
- 当设备没有连接到3G或WiFi网络
- 当设备已经崩溃,需要重新启动
- 当应用程序在前台
- 当应用程序在后台
- 当用户正在使用App
- 当我的应用程序被关闭(未打开/启动)
- 当推通知是用户特定并且两个用户共享相同的设备和应用程序。例如:如果丈夫和妻子共享同一台设备,并使用银行应用程序使用推送通知
- 您可发送用户的具体通知,如果设备是由多个用户共享?
- 当用户在多个设备上安装应用程序
- 您可以发送通知给所有用户注册一次设备?
- 请您存储设备类型(的iOS或Android)与registrationID在用户表或有没有办法通过检查令牌或registrationID? 来区分设备类型
- 您可以取消previously发送通知,这是没有看过,并发送一个新的?
- 这还算不错,Android的推送通知不能在Kindle Fire的工作,需要实现亚马逊设备信息
- 还有什么,我需要考虑或计划?我知道处理未登记和反馈服务
- When the device is turned off
- When the device is not connected to 3G or Wifi networks
- When the device has crashed and need restart
- When the App is in foreground
- When the App is in the background
- When user is currently using the App
- When my app is closed (not opened / launched)
- When a push notification is user specific and both users share the same device and app. Example: If a husband and wife share same device and use a bank App with Push notification.
- Can you send User specific notification if device is shared by multiple users?
- When user has installed App on multiple devices
- Can you send a notification to all devices registered by a user at once?
- Do you store the device type (iOS or Android) with the registrationID in the User table or is there a way to differentiate the type of device by inspecting the token or registrationID?
- Can you cancel a previously sent notification which is not read yet and send a new one?
- Is it still true that Android Push Notifications does not work on Kindle Fire and will need to implement Amazon Device Messaging
- Anything else that I need to think of or plan? I am aware of handling un-registering and feedback service
推荐答案
当设备被关闭:
答:IOS / Android的服务器(不是你的服务器)将进行处理时,发送推送通知。它检查该设备可达与否。我们可以定义多少次IOS / Android的服务器应该尝试发送推送通知。
Answer:IOS/Android Server (Not your Server) will handled when to send the Push Notification. It checks that device is reachable or not. We can define that how many times IOS/Android Server should try to send Push Notification.
当设备没有连接到3G或WiFi网络
答:没有相关的2G / 3G /无线网络连接。设备应通过任何网络连接到因特网。
Answer:Nothing related to 2G/3G/Wi-Fi. Device should be connected to Internet via any network.
当设备已经崩溃,需要重新启动
答:IOS / Android的服务器检查设备可达与否。
Answer:IOS/Android Server checks that device is reachable or not.
当应用程序在前台
答:没有在前台相关的应用程序。
Answer:Nothing related to app in foreground.
当应用程序在后台
答:在没有任何背景的相关应用程序。
Answer:Nothing related to app in background.
当用户正在使用App
答:没什么关系到应用程序当前正在使用。
Answer:Nothing related to app being used currently.
当我的应用程序被关闭(未打开/启动)
答:没有相关的应用程序被关闭。
Answer:Nothing related to app is closed.
当一个推送通知是特定的用户和两个用户共享相同的设备和应用程序。例如:如果丈夫和妻子共享同一台设备,并使用银行应用程序使用推送通知
答:这取决于你如何在你的服务器已经实现。你会被管理的设备ID为每个用户。所以这是高达你实现逻辑发送到同一台设备为多个用户。
Answer:It depends on how you have implemented on YOUR Server. You will be managing Device Id for each user. So it's upto your implementation logic to send to same device for multiple users.
您可以发送用户的具体通知,如果设备是由多个用户共享?
答:这取决于你如何在你的服务器已经实现。你会被管理的设备ID为每个用户。所以这是高达你实现逻辑。
Answer:It depends on how you have implemented on YOUR Server. You will be managing Device Id for each user. So it's upto your implementation logic.
当用户在多个设备上安装应用程序
答:这取决于你如何在你的服务器已经实现。
Answer:It depends on how you have implemented on YOUR Server.
您可以发送通知给所有用户注册一次设备?
答:再次是根据您的实现逻辑。
Answer:Yes again as per your implementation logic.
您存储在用户表中的设备类型(的iOS或Android)与registrationID还是有办法通过检查来区分设备类型的标记或registrationID?
答:是的,你需要存储设备类型,以确定哪个服务器(IOS / Android的),你需要发送请求推送通知。
Answer:Yes you need to store the device type, to identify to which Server (IOS/Android), you need to send request for Push Notification.
可以取消previously发送通知,这是没有看过,并发送一个新的?
答:不,你无法取消该请求。
Answer:No you cannot cancel the request.
这还算不错,Android的推送通知不能在Kindle Fire的工作,需要实现亚马逊设备消息
答:需要围绕谷歌它。
Answer:Need to google it around.
还有什么,我需要考虑或计划?我知道处理未登记和反馈服务
答:需要围绕谷歌它。
Answer:Need to google it around.
这篇关于处理的iOS和Android推送通知的情况的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!