Skip to content

Instantly share code, notes, and snippets.

@eric-romero
Created June 17, 2019 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eric-romero/52cc3706bad0149647a78abdefa54151 to your computer and use it in GitHub Desktop.
Save eric-romero/52cc3706bad0149647a78abdefa54151 to your computer and use it in GitHub Desktop.
public abstract class SafeJobIntentService extends JobIntentService {
@Override
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= 26) {
mJobImpl = new androidx.core.app.SafeJobServiceEngineImpl(this);
} else {
mJobImpl = null;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment