Class WeatherSyncAdapter
- java.lang.Object
-
- AbstractThreadedSyncAdapter
-
- de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherSyncAdapter
-
public class WeatherSyncAdapter extends AbstractThreadedSyncAdapter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWeatherSyncAdapter.UpdateFlags
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringEXTRAS_UPDATE_FLAGstatic java.lang.StringIC_IDstatic java.lang.StringWARNING_NC_GROUPstatic java.lang.StringWARNING_NC_ID_SKELETON
-
Constructor Summary
Constructors Constructor Description WeatherSyncAdapter(Context context, boolean autoInitialize)WeatherSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcancelDeprecatedWarningNotifications(Context context, NotificationManager notificationManager)static NotificationgetNotification(Context context, NotificationManager notificationManager)static IntentgetWarningIntent(Context context, WeatherWarning weatherWarning)static NotificationgetWarningNotification(Context context, NotificationManager notificationManager, WeatherWarning weatherWarning, java.lang.String sortKey, int uniqueNotificationID)static PendingIntentgetWarningPendingIntent(Context context, WeatherWarning weatherWarning, int uniqueNotificationID)static booleanlaunchWeatherWarningNotifications(Context context, java.util.ArrayList<WeatherWarning> warnings, boolean discardAlreadyNotified)voidonPerformSync(Account account, Bundle bundle, java.lang.String authority, ContentProviderClient contentProviderClient, SyncResult syncResult)static voidresetNotifications(Context context, NotificationManager notificationManager)static voidUpdate(Context context, Bundle bundle)
-
-
-
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
-
-
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)
-
-