Share My Creation B4A-Bridge-Relay, by 12Lab : deploy apk from B4A IDE to many targets; status; progress; B4A-Bridge

As we all know, to test several devices requires cycling a B4A-IDE through the multiple android devices, and waiting each time to deploy the apk to the target device. I modified the B4A-Bridge to add a 'relay' function, to simultaneously deploy to 1 or more additional devices running a B4A-Bridge. Just program the IP addresses (or address range) of the other devices into the -Relay, then connect the IDE to the device with the -Relay. The 'downstream' device 'Bridges' can be Erel's standard issue, or this B4A-Bridge-Relay, as desired. More info at the link below. This has saved me quite a bit of time and hassle testing multiple devices and multiple device apps.

Other additional features have been added:
  • can temporarily bypass the relay function, and re-enable it as desired
  • gives indication that apk transfer started, and progress of transfer
  • displays a 'Heartbeat' metric, which gives an indication of the connection condition, and is colorized for quick-glance feedback
Available at: Google Play, B4A-Bridge-Relay from 12Lab, and now in -Free

If you just want to add the transfer progress feature yourself, see http://www.b4x.com/android/forum/threads/b4a-bridge-source-code.8153/page-2#post-212716.

This version still retains Bluetooth connectivity.

-Free Updated 2014/12/21 to v2.12.11: updated with several fixes and the PHONE_READ_STATE permission was removed (it was used in the past to show the device id)
-Free Updated 2014/09/12 to v2.10.10: Improved layout.
-Free Updated 2014/07/27 to v2.10.9: Changed "Wake Lock" behavior.
-Free Released 2014/06/29 Added -Free "Ads" supported version, so there is no direct cost to try -Relay.

Updated 2016/12/28 to v2.20.37: Added Themes, FTP Service.
Updated 2014/06/28 to v2.10.7: Added "Wake Lock", keep the device from sleeping, while UI is up.
Updated 2014/02/13 to v2.10.6: Added several enhancements.
Updated 2014/02/09-10 to v2.10.4-5: Enhancements; two bug fixes.
Updated 2014/01/28 to v2.10.3. Added a new feature.
Updated 2014/01/08 to V2.10.1. Fixes two issues.
Updated 2014/01/11 to V2.10.2. Fixes one issue, and releases an enhancement.
More information at: http://themr23.wordpress.com/2014/01/04/b4a-bridge-relay-by-12lab/.
 

Attachments

  • Sample.7.jpg
    Sample.7.jpg
    61.7 KB · Views: 12,827
Last edited:

leitor79

Active Member
Licensed User
Longtime User
Hi mr23, thank you very much for sharing!

I'm having an issue; I manage to connect both devices, but when I start on debug mode I get 2 things:

- On the second device, te apps ask to be installed, but then I get stuck on "waiting for debugger to connect" toastmessage. If I connect that device to "standar" b4a directly, It works fine.

- The log on the IDE keeps logging "sending message to waiting queue (astream_newdata)", then a message about too many messages. This happens even if I stop executing the app. The messages shown as 1-2 per second, so it's very uncomfortable since I log data on my own to debug.


One thing I'm doing I'm not sure If I'm doing it right, is using b4a "standard" on the second device and your b4a bridge relay on the main one. b4a is set to connect to the main device. I get the green message "connected" and the secondary IP after I connect b4a to it.

Thank you very much!
 

mr23

Active Member
Licensed User
Longtime User
You can only debug 1 device at a time. Generally, I do the implementation/debug cycles using 1 device (hit 'skip clients', then debug), then switch to release mode for testing multiple devices ('hit 'use clients', then install); or just close the debugger in the IDE if staying in debug compiler.

Read this thread about the messages. It is likely the combined heartbeat/connection indicator. I could look into pausing that in this condition, if filtering the messages is a problem. I believe it is harmless, just annoying.

You are correct, you can use the standard B4A bridge app on the downstream devices.
 

mr23

Active Member
Licensed User
Longtime User
I just installed 5.02. Started B4a-Bridge-Relay on a device. Went to Tools->B4aBridge->Connect->New IP, entered IP. It connected right away. I assume that works for you.

If I understand you correctly you are trying to enter an IPAddr : PortNumber? That's a question for AnywhereSoft/Erel et al, not for this thread. But my understanding is B4a never accepted port numbers in the UI, just an IP addr.
 
Last edited:
Top