Android Question ACL 4.6 and Galaxy S6 - Flashlight?

philly_tee

Member
Licensed User
Longtime User
Hi

I am trying to get the flashlight to work on command using ACL 4.6, B4A 6.8 on a Galaxy S6 SM-G920I (Android 6.0.1)

I receive an error message from this code:

B4X:
Sub btnTorch_Click
    Dim AC As AdvancedCamera
    AC.Initialize(pnlHistory, "ACL")
    AC.FlashTorch
End Sub

Error:
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.Camera$Parameters android.hardware.Camera.getParameters()' on a null object reference
    at xvs.ACL.ACL.FlashTorch(ACL.java:973)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:163)
    at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:78)
    at android.view.View.performClick(View.java:5697)
    at android.widget.TextView.performClick(TextView.java:10815)
    at android.view.View$PerformClick.run(View.java:22526)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:158)
    at android.app.ActivityThread.main(ActivityThread.java:7229)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
I haven't been able to find anything on this issue so far. Is anyone able to assis?

Thanks

Philip
 

DonManfred

Expert
Licensed User
Longtime User
Additionally which Android jar did you configure in the IDE?
 
Upvote 0
Top