[英]Deciding strategy for app subscription expiry notification in Android - (Client side or server side?)
I need to show notification to my Android app users when their subscription for the app is expired. 当我的Android应用程序用户的订阅到期时,我需要向他们显示通知。 I figured out two ways to do this but not sure which one to choose. 我想出了两种方法来执行此操作,但不确定要选择哪种方法。
Set daily alarm on android phone and check if the subscription date is lapsed. 在Android手机上设置每日闹铃,并检查订阅日期是否已过。 If it is expired, show notification to user and update the server that the app subscription is over. 如果已过期,则向用户显示通知并更新服务器,该应用程序订阅已结束。
Set daily alarm on server side (node.js) and if the subscription date is lapsed, send notification to the app using GCM. 在服务器端(node.js)设置每日警报,如果订阅日期已过,请使用GCM向应用发送通知。 Android app will display notification to user. Android应用程序将向用户显示通知。
Which approach is the recommended approach? 推荐哪种方法? Any new suggestions/strategies are welcome. 欢迎任何新的建议/策略。 Thanks in advance. 提前致谢。
I would suggest you to use the 2nd approach, ie send a push to client to show the message. 我建议您使用第二种方法,即向客户发送推送以显示消息。 Main reason is, eg you might need to change the logic when you'll need to show it. 主要原因是,例如,当需要显示逻辑时,您可能需要更改其逻辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.