Skip to content

Instantly share code, notes, and snippets.

@Aracem
Last active August 29, 2015 14:06
Show Gist options
  • Save Aracem/1ebbbfd16e76915d43f2 to your computer and use it in GitHub Desktop.
Save Aracem/1ebbbfd16e76915d43f2 to your computer and use it in GitHub Desktop.
An Android Studio template to generate the code of Job classes
/**
* Template to complete Jobs classes
*
* Declaration: Java - Declaration
* Variables:
* $CLASS$ expresion: className() defaultValue: Object
*
* Follow this instruction to add it to Android Studio
* http://dmytrodanylyk.com/pages/blog/templates.html
*/
public $CLASS$() {
super(new Params(Priority.HIGH).requireNetwork().groupBy("$CLASS$-job"));
}
@Override
public void onAdded() {
}
@Override
public void onRun() throws Throwable {
}
@Override
protected void onCancel() {
}
@Override
protected boolean shouldReRunOnThrowable(Throwable throwable) {
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment