Vibe force close. Vibrate
-
02-07-2021 - |
Question
I have a line of code that calls the Vibrator service.
if (vibe){
Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
v.vibrate(2000);
run();
} else {
run();
}
My app is force closing on that. Is it cause the emulator doesn't have a vibrator? Or did i do it wrong?
Solution
Yes, Please keep in mind that the vibrator alarm does not work on the Android emulator.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow