How can I prevent the program from stopping?

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

I am using the b4azxing library.

When the scan does not work and the user presses the stop button, the program itself stops. I just want the scan to stop.

For a test, I did this:

Sub Activity_Pause (UserClosed As Boolean)
If UserClosed Then Activity_Resume
End Sub

It compiles, but I never get to this point. Why?

Thanks

Peter
 

grafsoft

Well-Known Member
Licensed User
Longtime User
Question withdrawn. The ABZxing library has a canceled event - this does what I want.
Sorry
Peter
 
Upvote 0

eps

Expert
Licensed User
Longtime User
You'll need to consume the keypress, something along these lines...

B4X:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
      If KeyCode = KeyCodes.KEYCODE_BACK Then
            'Do your processing here, etc... show view / to front etc..
                      Return True
      End If
   End Sub

There are quite a few examples of this on here, hopefully the above should give you enough to get going on as a start.
 
Upvote 0
Top