当用户从 Cordova 的 iOS 通知中心选择通知时更改状态 [英] Change State when User Selects Notification from iOS Notification Center in Cordova

查看:19
本文介绍了当用户从 Cordova 的 iOS 通知中心选择通知时更改状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户单击通知中心中的消息推送通知时,我正在尝试在特定消息/状态(给定 ID)下打开 iOS/Ionic/Cordova 应用程序.有没有办法使用 Cordova 判断应用程序是否已通过通知中心打开?

I'm attempting to open an iOS/Ionic/Cordova app at a specific message/state (given an ID), when a user clicks on a message push notification in the notification center. Is there a way to tell, using Cordova, if the app has been opened through the notification center?

推荐答案

来自 docs,回调是通知的入口点.您在回调中进行的任何调用(或您设置的变量)只有在通过通知中心打开应用程序时才可能发生

From the docs, the callback is the point of entry for your notification. Any calls you make (or variables you set) inside the callback will only be possible if the app has been opened through the notification center

这篇关于当用户从 Cordova 的 iOS 通知中心选择通知时更改状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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