Skip to content

Instantly share code, notes, and snippets.

@vsay01
Created September 30, 2017 17:52
Show Gist options
  • Save vsay01/3b9da0765c2c412de4fe462a2bc6f5d8 to your computer and use it in GitHub Desktop.
Save vsay01/3b9da0765c2c412de4fe462a2bc6f5d8 to your computer and use it in GitHub Desktop.
public class AppIndexingUpdateService extends JobIntentService {
// Job-ID must be unique across your whole app.
private static final int UNIQUE_JOB_ID = 42;
public static void enqueueWork(Context context) {
enqueueWork(context, AppIndexingUpdateService.class, UNIQUE_JOB_ID, new Intent());
}
@Override
protected void onHandleWork(@NonNull Intent intent) {
AppIndexingUtil.setStickers(getApplicationContext(), FirebaseAppIndex.getInstance());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment