Android Question ACL 4.6 - Null Object Error

WDK

Member
Licensed User
I am trying to use the FlashTorch and am getting the following error. Any idea why?

Version in my manifest:
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>

B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 338)
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 b4a.example.main._activity_create(main.java:338)
 at java.lang.reflect.Method.invoke(Native Method)
 at anywheresoftware.b4a.BA.raiseEvent2(BA.java:186)
 at b4a.example.main.afterFirstLayout(main.java:102)
 at b4a.example.main.access$000(main.java:17)
 at b4a.example.main$WaitForLayout.run(main.java:80)
 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:7224)
 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)

 

WDK

Member
Licensed User
Thanks Manfred. I will try the button event.

Sorry about the image. I will use the tags going forward.

WDK
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…