Reputation: 9914
How to produce shaking(revaberating) effect in android(Similar to PS2 when a car hit an obstacle)?
Upvotes: 0
Views: 248
Reputation: 40407
public Vibrator vibrator;
vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(1000);
You will also need android.permission.VIBRATE in the manifest
Upvotes: 2