Android Question Frozen program with scanner

Omar Moreno

Member
Licensed User
Longtime User
Hi!.
Since 2018 I have programmed with the JhsIceZxing1 (1.06) library, but today I updated the B4A to version 11.00 and the program freezes after scanning.

Has anything changed since 2018?


These are the messages from the IDE:
Start the program:

--------- beginning of system
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Puede usar la camara: true
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Puede usar la camara: true

Call to the Lector activity:

** Activity (main) Pause, UserClosed = false **
** Activity (lector) Create, isFirst = true **
** Activity (lector) Resume **

Code Scan:

** Activity (main) Pause, UserClosed = false **
** Activity (lector) Create, isFirst = true **
** Activity (lector) Resume **
** Activity (lector) Pause, UserClosed = false **
PortraitScreen 720 1280
UPC_A:734414000171###zxload_result
sending message to waiting queue (OnActivityResult)
** Activity (lector) Create, isFirst = false **
running waiting messages (1)
Result has arrived
** Activity (lector) Resume **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Codigo: 734414000171

And here the program is frozen.

I attach a small example that freezes when scanning.

Thanks for your possible answers.
 

Attachments

  • Lector.zip
    12.8 KB · Views: 184

Omar Moreno

Member
Licensed User
Longtime User
Thanks for answering.

Check with older versions of B4A and the same happened, but then try another phone and all versions of B4A worked.

I found the problem in this phone configuration:
  1. In the Cellular settings
  2. Developer options
  3. Don't keep activities
  4. Delete activities when the user leaves them.
This setting kills activities, there is some way to detect and disable it with B4A.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
This setting kills activities, there is some way to detect and disable it with B4A.
Why would you need to? By default it is off and requires a deliberate series of actions by the user to enable it in which case he gets what he deseves for meddling in places where he shouldn't be! ?
 
Upvote 0

Omar Moreno

Member
Licensed User
Longtime User
[QUOTE = "agraham, publicación: 838622, miembro: 448"]
Why would you need to? By default it is off and requires a deliberate series of actions by the user to enable it in which case he gets what he deseves for meddling in places where he shouldn't be! ?
[/QUOTE]
I agree with you.
Those "curious" users, who somehow disable programs that are used outside of companies ... then they say: "I can't use the program", it freezes when I scan the code ... I'll work manually today ....
...?
 
Last edited:
Upvote 0
Top