Hi I want to call a vibration class throughout my android activities. Can someone please point me in the right direction? This is my vib class so far:
import android.content.Context;
import android.os.Vibrator;
public class Vibrate {
Vibrator vibs = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
public static void main(String[] args) {
// TODO Auto-generated method stub
}
public void vib(int length) {
vibs.vibrate(length);
}
}
and I want to call this guy from one of my activities like this:
Vibrate vib = new Vibrate();
...
vib.vib(500);
Thanks for all your help!