Class WeatherSyncAdapter


  • public class WeatherSyncAdapter
    extends AbstractThreadedSyncAdapter
    • Field Detail

      • EXTRAS_UPDATE_FLAG

        public static final java.lang.String EXTRAS_UPDATE_FLAG
        See Also:
        Constant Field Values
      • IC_ID

        public static java.lang.String IC_ID
      • WARNING_NC_ID_SKELETON

        public static java.lang.String WARNING_NC_ID_SKELETON
      • WARNING_NC_GROUP

        public static java.lang.String WARNING_NC_GROUP
    • Constructor Detail

      • WeatherSyncAdapter

        public WeatherSyncAdapter​(Context context,
                                  boolean autoInitialize)
      • WeatherSyncAdapter

        public WeatherSyncAdapter​(Context context,
                                  boolean autoInitialize,
                                  boolean allowParallelSyncs)
    • Method Detail

      • onPerformSync

        public void onPerformSync​(Account account,
                                  Bundle bundle,
                                  java.lang.String authority,
                                  ContentProviderClient contentProviderClient,
                                  SyncResult syncResult)
      • getNotification

        public static Notification getNotification​(Context context,
                                                   NotificationManager notificationManager)
      • getWarningIntent

        public static Intent getWarningIntent​(Context context,
                                              WeatherWarning weatherWarning)
      • getWarningPendingIntent

        public static PendingIntent getWarningPendingIntent​(Context context,
                                                            WeatherWarning weatherWarning,
                                                            int uniqueNotificationID)
      • getWarningNotification

        public static Notification getWarningNotification​(Context context,
                                                          NotificationManager notificationManager,
                                                          WeatherWarning weatherWarning,
                                                          java.lang.String sortKey,
                                                          int uniqueNotificationID)
      • launchWeatherWarningNotifications

        public static boolean launchWeatherWarningNotifications​(Context context,
                                                                java.util.ArrayList<WeatherWarning> warnings,
                                                                boolean discardAlreadyNotified)
      • cancelDeprecatedWarningNotifications

        public static void cancelDeprecatedWarningNotifications​(Context context,
                                                                NotificationManager notificationManager)
      • resetNotifications

        public static void resetNotifications​(Context context,
                                              NotificationManager notificationManager)
      • Update

        public static void Update​(Context context,
                                  Bundle bundle)