cn.jpush.api.push.model.notification
类 IosNotification
java.lang.Object
cn.jpush.api.push.model.notification.PlatformNotification
cn.jpush.api.push.model.notification.IosNotification
- 所有已实现的接口:
- PushModel
public class IosNotification
- extends PlatformNotification
APNs 通知类
支持 APNs 默认的几个参数:
alert: 继承自父类 PlatformNotification 的 alert 属性;本类设置则覆盖。
badge: 支持 setBadge(int) 方法来设置;支持 incrBadge(int) 方法来增加。
sound: 支持 setSound(string) 方法来设置声音文件。
content-available: 用来支持后台推送。如果该值赋值为 1,表示开启后台推送。
extras: JSON object. 支持更多的自定义字段信息。
需要特别留意的是,JPush SDK 会对以下几个值有特别的默认设置考虑:
badge: 默认为 "+1"。如果需要取消 badge 值,需要显式地调用 disableBadge().
sound: 默认为 "",即默认的声音提示。如果需要取消 sound 值,即不要声音,需要显式地调用 disableSound().
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NOTIFICATION_IOS
public static final String NOTIFICATION_IOS
- 另请参见:
- 常量字段值
newBuilder
public static IosNotification.Builder newBuilder()
alert
public static IosNotification alert(String alert)
getPlatform
public String getPlatform()
- 指定者:
- 类
PlatformNotification 中的 getPlatform
toJSON
public com.google.gson.JsonElement toJSON()
- 指定者:
- 接口
PushModel 中的 toJSON - 覆盖:
- 类
PlatformNotification 中的 toJSON
Copyright © 2014. All Rights Reserved.