How is to pause resume this code

@SimpleFunction

 public void Start (AndroidViewComponent view, float awal, float akhir, int duration, int repeat) {

    ObjectAnimator rotate = ObjectAnimator.ofFloat(view.getView(), "rotation", awal, akhir);

    rotate.setRepeatCount(repeat);

    rotate.setInterpolator(new LinearInterpolator());

    rotate.setDuration(duration);

    rotate.start();

    

     }

@SimpleFunction(description = “pause”)

public void pause(AndroidViewComponent view) {

   setrotate.pause();

      } 

}

i tried simple function pause not work .

@dewi_btiah What are you trying to create?

I make rotation start function but how to make pause and resume function code in Java extension according my peroject Java