如何将推送主题设置为推送通知的标题? [英] How to set push subject as the title for push notification?

查看:34
本文介绍了如何将推送主题设置为推送通知的标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将推送主题设置为推送通知的标题?我正在获取应用程序名称作为主题,描述与推送中给出的相同.我想更改推送的标题.
这在iOS中可能吗?我希望它可以在android中实现.

Is there any possibilities of setting push subject as the title in push notification? I'm getting app name as the subject and description is same as given in the push. I want to change the title of the push.
Is this possible in iOS? I hope it is possible in android.

推荐答案

我刚刚在运行 iOS 9.1 的 iPhone 6s 上对此进行了测试,结果如下:如果标题字段作为警报字典的一部分提供,则通知在锁定屏幕上仍会显示捆绑包名称.但是,在通知中心(通过从顶部边缘向下滑动访问)中查看相同的通知时,将使用标题代替应用程序/捆绑包名称.

I just tested this on an iPhone 6s running iOS 9.1, and here's what I found: If the title field is provided as part of the alert dictionary, the notification on the lock screen will still show the bundle name. However, when viewing the same notification in Notification Center (accessed by swiping down from the top edge), the title is used in place of the app/bundle name.

当警报字典中未提供标题字段时,捆绑包名称会同时显示在锁定屏幕和通知中心中.

When no title field is provided as part of the alert dictionary, the bundle name is displayed in both the lock screen and the Notification Center.

这篇关于如何将推送主题设置为推送通知的标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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