문제

I'm hoping not, but just wanted to get a definitive answer since its not stated in the docs. Do I have to check with Vibrate.hasVibrator before vibrating?

도움이 되었습니까?

해결책

According to the source code of android.os.Vibrator, vibrate() will not throw anything:

public void vibrate(long milliseconds)
{
    try {
        mService.vibrate(milliseconds, mToken);
    } catch (RemoteException e) {
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top