Wish vibration, flash light...

stari

Active Member
Licensed User
Longtime User
would like to control the vibration and also turn on flash light...

thanx :)

LED ON/OFF
In Sub Globals you define cam as JavObject.


B4X:
Sub LedOn
    'btnOn.Enabled = False  
    Cam.InitializeStatic("android.hardware.Camera")
    Cam = Cam.RunMethod("open",Null)
    Dim Par As JavaObject = Cam.RunMethod("getParameters",Null)
    Par.RunMethod("setFlashMode",Array As Object("torch"))
    Cam.RunMethod("setParameters",Array As Object(Par))
End Sub
Sub LedOff
    'btnOn.Enabled = True
    Cam.RunMethod("release",Null)
End Sub
 

ilan

Expert
Licensed User
Longtime User
GreatNews-1.jpg
 
Top