Last active
August 29, 2015 14:06
-
-
Save Aracem/1ebbbfd16e76915d43f2 to your computer and use it in GitHub Desktop.
An Android Studio template to generate the code of Job classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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