Vibe force close. Vibrate
-
02-07-2021 - |
Pergunta
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?
Solução
Yes, Please keep in mind that the vibrator alarm does not work on the Android emulator.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow