How to create vibrate effect with unlimited duration, and i can stop it with code ?
Sub Activity_Create(FirstTime As Boolean)
Dim v As PhoneVibrate
v.Vibrate(10000000)
End Sub
Sub Activity_Click
Dim v As JavaObject = GetContext
v = v.RunMethodJO("getSystemService", Array ("vibrator")).RunMethod("cancel", Null)
End Sub
Sub GetContext As JavaObject
Return GetBA.GetField("context")
End Sub
Sub GetBA As JavaObject
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetFieldJO("processBA")
End Sub
Dim telMgr1 As JavaObject = GetContext.RunMethod("getSystemService", Array("vibrator"))
Dim vib As Boolean = telMgr1.RunMethod("hasVibrator", Null)
Log(vib)
telMgr1.RunMethod("vibrate", Array As Object(2000))
Why don't you use PhoneVibrate from the Phone library?I got it working via Java code that I have added to my fiddleAround library
You need to declare a long variable and pass it inside the array.but also want to try and understand how to do it via the RunMethod.