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.

Revisions

  1. Aracem renamed this gist Sep 26, 2014. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion JobTemplate → JobTemplate.java
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,13 @@

    /**
    * 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"));
  2. Aracem created this gist Sep 26, 2014.
    24 changes: 24 additions & 0 deletions JobTemplate
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@


    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;
    }