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 class
WeatherSyncAdapter.UpdateFlags
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXTRAS_UPDATE_FLAG
static java.lang.String
IC_ID
static java.lang.String
WARNING_NC_GROUP
static java.lang.String
WARNING_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 void
cancelDeprecatedWarningNotifications(Context context, NotificationManager notificationManager)
static Notification
getNotification(Context context, NotificationManager notificationManager)
static Intent
getWarningIntent(Context context, WeatherWarning weatherWarning)
static Notification
getWarningNotification(Context context, NotificationManager notificationManager, WeatherWarning weatherWarning, java.lang.String sortKey, int uniqueNotificationID)
static PendingIntent
getWarningPendingIntent(Context context, WeatherWarning weatherWarning, int uniqueNotificationID)
static boolean
launchWeatherWarningNotifications(Context context, java.util.ArrayList<WeatherWarning> warnings, boolean discardAlreadyNotified)
void
onPerformSync(Account account, Bundle bundle, java.lang.String authority, ContentProviderClient contentProviderClient, SyncResult syncResult)
static void
resetNotifications(Context context, NotificationManager notificationManager)
static void
Update(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)
-
-