Android Question Camera

Isac

Active Member
Licensed User
Longtime User
When I press Button2 the camera opens and closes when I press the bottone3
When I press again bottone2 the camera does not work and closes the program.


Code: Copy
 camEx.Initialize(Panel1,frontCamera,Me,"camEx")


Code: Copy
Sub Button2_Click
camEx.StartPreview
End Sub


Code: Copy
Sub Button3_Click
camEx.CloseNow
End Sub

thanks
 
I get this error: An error has occurred in sub: java.lang.NullPointerException
 
Upvote 0
Code: Copy
Sub Button3_Click
camEx.Release
End Sub

Code: Copy
Sub Button3_Click
camEx.StopPreview
End Sub

If you want preview again later then you should use StopPreview and later StartPreview...

If you want to leave to activity then i would say Release is more what you want... If you leave due to calling a new activity and later when you come back from this activity your activity would be resumed. Due to the release you must do a new initialization i think...
 
Upvote 0
Back
Top