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().

  • 嵌套类摘要
    static class IosNotification.Builder
               
     
    字段摘要
    static String NOTIFICATION_IOS
               
     
    从类 cn.jpush.api.push.model.notification.PlatformNotification 继承的字段
    ALERT, LOG
     
    方法摘要
    static IosNotification alert(String alert)
               
     String getPlatform()
               
    static IosNotification.Builder newBuilder()
               
     com.google.gson.JsonElement toJSON()
               
     
    从类 cn.jpush.api.push.model.notification.PlatformNotification 继承的方法
    getAlert, setAlert
     
    从类 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.