As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center提供指导。
7年前关闭。
我的应用程序中有推送通知,如果应用程序关闭或在后台运行,则一切正常,但是如果应用程序运行( Activity ),则不会显示推送通知,而是调用方法
7年前关闭。
我的应用程序中有推送通知,如果应用程序关闭或在后台运行,则一切正常,但是如果应用程序运行( Activity ),则不会显示推送通知,而是调用方法
application:didReceiveRemoteNotification:
最佳答案
看看这个答案https://stackoverflow.com/a/7965961/869455
当应用打开时,应用有责任在application:didReceiveRemoteNotification:中适当地处理通知,并向应用内部的用户显示一条消息。