On Android 4+ you can use this code to check whether this feature is available:
B4X:
Private Sub HasVibrator As Boolean
Dim jo As JavaObject
jo.InitializeContext
Dim p As Phone
If p.SdkVersion < 12 Then Return True
Return jo.RunMethodJO("getSystemService", Array("vibrator")).RunMethod("hasVibrator", Null)
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.