Wish vibration, flash light...

Filippo

Expert
Licensed User
+1
 

stari

Active Member
Licensed 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
 
Top