android.support.v4.app.JobIntentService Java Examples
The following examples show how to use
android.support.v4.app.JobIntentService.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MyWidgetProvider.java From TextThing with BSD 2-Clause "Simplified" License | 6 votes |
@Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { final int count = appWidgetIds.length; for (int i = 0; i < count; i++) { int widgetId = appWidgetIds[i]; RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.retro_widget); Intent intent = new Intent(context, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); PendingIntent pendingIntent = PendingIntent.getActivity( context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT ); remoteViews.setOnClickPendingIntent(R.id.wContent, pendingIntent); appWidgetManager.updateAppWidget(widgetId, remoteViews); } JobIntentService.enqueueWork(context, WidgetUpdateService.class, 1, new Intent()); }
Example #2
Source File: BoundaryEventBroadcastReceiver.java From react-native-boundary with Apache License 2.0 | 4 votes |
@Override public void onReceive(Context context, Intent intent) { Log.i(TAG, "Broadcasting geofence event"); JobIntentService.enqueueWork(context, BoundaryEventJobIntentService.class, 0, intent); }
Example #3
Source File: AppWidgetUpdateReceiver.java From TextThing with BSD 2-Clause "Simplified" License | 4 votes |
@Override public void onReceive(Context context, Intent intent) { JobIntentService.enqueueWork(context, WidgetUpdateService.class, 1, intent); }