Android Question intent and Waiting for IDE debugger to connect

proinko

Member
Licensed User
Longtime User
hi all

the app i am working in, uses two different barcode scanner devices, from different manufacturers.

To get the barcode, the app uses two services (one for each barcode scanner device), and i added two "AddReceiverText" in the manifest for the intent filter (one for each barcode scanner device).

The "Service_Start (StartingIntent As Intent)" sub gets the barcode, and using CallSubDelayed2, the service sends it to the activity.

This works ok (the barcode string is returned to the activity), but with the app compiled in release mode, after pressing the scanning key on the scanner devices, the app always shows the "Waiting for IDE debugger to connect" toastmessage (it happens using any of the two devices)

This message does not shows in any other process of the app.

I searched the forum, but i have not been able to find anything about this problem in release mode.

can be something wrong in my code, or somewhere else?

thanks for your help!
 

proinko

Member
Licensed User
Longtime User
hi Erel

Maybe i am missing something about compiling.This is what i am doing

- Just in case, i uninstall the last installed version of the app on the device
- connect the device via USB (i am not using B4A-Bridge)
- i select "Release" on the IDE, and click on "Run". The app runs on the device.
- To be sure of what is happening, i close the app and unplug the USB cable.
- I start the app, and when i scan pressing the scan trigger button of the devices, the scanned value is returned to the activity ... together with the "Waiting for IDE debugger to connect" toastmessage.

But apart from this, there is another problem that i have not seen before. The "Service_Start (StartingIntent As Intent) + callsub" procedure is working this way the first time. If the user stays on the same activity, the second time he presses the scanning button, the service sends back the scanned value taking about 10 seconds (the first time it is returnded almost immediately) without the "Waiting for the IDE..." message. It seems somethig is released, because the third scanning acts as the first one, ... and so on.

Just in case, I have tried using callsub,callsub2, callsubdelayed, callsubdelayed2

Maybe i have to sleep more, but this what is happening, or what i am seeing.

The filtered log shows no errors. I attach two unfiltered logs, corresponding to the first scan, and for the second one (sent from the same activity)

thanks!
 

Attachments

  • 1stScanLog.txt
    8.5 KB · Views: 346
  • 2ndScanLog.txt
    11.7 KB · Views: 322
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Just in case, i uninstall the last installed version of the app on the device
Not required.

together with the "Waiting for IDE debugger to connect" toastmessage.
My guess is that there is another app that you created installed that also listens to that intent.
 
Upvote 0

proinko

Member
Licensed User
Longtime User
(i wrote another reply but it seems to be lost. Apologize if it gets to here too)

Well, it is done, thanks Erel! :)

I had several examples installed on the devices, but none of them were running. I had rebooted several times both devices, and after your reply, i checked what was running at that moment. Can an app "awake" another app that, in case it would be running, it used the same intent?

All these other apps where saved as b4a.example, and they were last executed in debug mode (i guess this is what made the "Waiting.." message to show ) , so i have not been able to know which one of them was causing the issue.

Anyway after uninstalling them, it works as desired!

In case somebody could be interested in the "scan button-start service-return value to the activity" thing for the specific scanner models i am using, should i post the manifest added lines and the service code somewhere, stating the device model names? It took me some days to get it (but keep in mind i am an absolute newbie)
 
Upvote 0
Top