public class PollingScheduler
extends android.content.BroadcastReceiver
Application
instance must implement the TapkeyAppContext
interface in order for
this class to function.
This class is used by registering it via its register(Context, int, int)
method.
PollingScheduler.register(this, uniqueJobId, PollingScheduler.DEFAULT_INTERVAL);
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_INTERVAL
The default polling interval of eight hours.
|
Constructor and Description |
---|
PollingScheduler() |
Modifier and Type | Method and Description |
---|---|
void |
onReceive(android.content.Context context,
android.content.Intent intent) |
static Closeable |
register(android.content.Context context,
int jobId,
int intervalMs)
Registers polling for Tapkey notifications.
|
abortBroadcast, clearAbortBroadcast, getAbortBroadcast, getDebugUnregister, getResultCode, getResultData, getResultExtras, goAsync, isInitialStickyBroadcast, isOrderedBroadcast, peekService, setDebugUnregister, setOrderedHint, setResult, setResultCode, setResultData, setResultExtras
public static final int DEFAULT_INTERVAL
public void onReceive(android.content.Context context, android.content.Intent intent)
onReceive
in class android.content.BroadcastReceiver
public static Closeable register(android.content.Context context, int jobId, int intervalMs)
context
- the Android Context.jobId
- an application-wide unique job ID.intervalMs
- the polling interval.