Class PushConfigCenter

  • All Implemented Interfaces:

    
    public class PushConfigCenter
    
                        

    用来进行推送初始化配置的主要管理类

    Author:

    zoulu

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<PushType> getPreferPushType(Context context, PushConfig pushConfig) 获取适合的推送类型 根据手机机型和用户 enable 适配的推送类型
      void saveConfig(Context context, PushConfig pushConfig)
      boolean isFcmCacheValid(Context context) 在用户有配置 FCM 推送的情况下,每 2 小时清空一下缓存
      boolean isNeedReportToken(Context context, PushType pushType, String token) 判断是否需要上传 token
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PushConfigCenter

        PushConfigCenter()
    • Method Detail

      • getPreferPushType

         List<PushType> getPreferPushType(Context context, PushConfig pushConfig)

        获取适合的推送类型 根据手机机型和用户 enable 适配的推送类型

      • saveConfig

         void saveConfig(Context context, PushConfig pushConfig)
      • isFcmCacheValid

         boolean isFcmCacheValid(Context context)

        在用户有配置 FCM 推送的情况下,每 2 小时清空一下缓存

      • isNeedReportToken

         boolean isNeedReportToken(Context context, PushType pushType, String token)

        判断是否需要上传 token