Class WeatherSyncAdapter
AbstractThreadedSyncAdapter
de.kaffeemitkoffein.tinyweatherforecastgermany.WeatherSyncAdapter
public class WeatherSyncAdapter extends AbstractThreadedSyncAdapter
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWeatherSyncAdapter(Context context, boolean autoInitialize) WeatherSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) -
Method Summary
Modifier and TypeMethodDescriptionstatic 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, String sortKey, int uniqueNotificationID) static PendingIntentgetWarningPendingIntent(Context context, WeatherWarning weatherWarning, int uniqueNotificationID) static booleanlaunchWeatherWarningNotifications(Context context, ArrayList<WeatherWarning> warnings, boolean discardAlreadyNotified) voidonPerformSync(Account account, Bundle bundle, String authority, ContentProviderClient contentProviderClient, SyncResult syncResult) static voidresetNotifications(Context context, NotificationManager notificationManager) static voidUpdate(Context context, Bundle bundle)
-
Field Details
-
EXTRAS_UPDATE_FLAG
- See Also:
-
IC_ID
-
WARNING_NC_ID_SKELETON
-
WARNING_NC_GROUP
-
-
Constructor Details
-
WeatherSyncAdapter
public WeatherSyncAdapter(Context context, boolean autoInitialize) -
WeatherSyncAdapter
public WeatherSyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs)
-
-
Method Details
-
onPerformSync
public void onPerformSync(Account account, Bundle bundle, String authority, ContentProviderClient contentProviderClient, SyncResult syncResult) -
getNotification
public static Notification getNotification(Context context, NotificationManager notificationManager) -
getWarningIntent
-
getWarningPendingIntent
public static PendingIntent getWarningPendingIntent(Context context, WeatherWarning weatherWarning, int uniqueNotificationID) -
getWarningNotification
public static Notification getWarningNotification(Context context, NotificationManager notificationManager, WeatherWarning weatherWarning, String sortKey, int uniqueNotificationID) -
launchWeatherWarningNotifications
public static boolean launchWeatherWarningNotifications(Context context, 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)
-