B4A Library B4ABridgePlus utility program

Although not really a library I thought that I would post this here for registered users.

B4A-BridgePlus.exe is an Android device File Manager program that runs on the desktop and communicates with an extended version of B4A-Bridge on the device. Using this you can copy files to and from desktop and device, delete files on desktop and device and install apks from the desktop onto the device - all without needing to use adb or DDMS.

B4A-BridgePlus.exe needs no installation (it is written in Basic4ppc) just put it somewhere together with folder.ico. Install B4A-BridgePlus1.00.apk on your device and run it just like the original B4A-Bridge where it will work with the Basic4android IDE as well as B4ABridgePlus.exe. It should be obvious how to drive B4A-BridgePlus. Right click on a file to do something to it.

There is a transparency issue with the folder icon on the ListView causing a black border that I don't know how to get rid of. Googling I've seen that other people have encountered this but I haven't found a definitive solution yet - but I haven't tried very hard! If you have an folder icon without any transparency you could try renaming it and using it instead of my folder.ico. If it looks nice then post it so I can use it too. :)

EDIT :- Version 1.1 posted. See post#7 for details.

EDIT :- Source and project posted. See post#27 for details.
 

Attachments

  • B4A-BridgePlus1.1.zip
    160 KB · Views: 3,007
  • B4A-BridgePlus1.4Project.zip
    10 KB · Views: 2,020
Last edited:

agraham

Expert
Licensed User
Longtime User
Have a play. Note that this project compiles under my own personally modified version of Basic4ppc which differs from yours so you may have to slightly play with the source. In particular it uses a library called Reflection which you should change to the Door library.
 

Attachments

  • B4ABridgePlus.zip
    11.3 KB · Views: 493

islandman

Member
Licensed User
Longtime User
Library for B4aBridge exe Source code

Hello
Thanks for this great tool.

I need help to modify the source code of the exe file.
I bought B4basicPPC but i really don't know what to do to compile without error

First, Controls and Reflections dll are missing. Then i upload Door dll component
Then impossible to compile. Message appears :

IpBox.New1 -> "Object reference not set...."

Compile error -> No match was found to type : folderdialog...

Well, i feel that i bought this old Basic4ppc for nothing....but it still interesting
to develop tools for Pc-desktop

Help please
Regards
 

islandman

Member
Licensed User
Longtime User
Super Agraham

Thanks alot...:sign0060:
My brain burning but it's great....another language to learn...

Do you think that Basic4ppc will be updated ?:sign0089:
 

agraham

Expert
Licensed User
Longtime User
Sorry, I got the additional libraries link above wrong, now corrected.

I don't think Erel will be updating Basic4ppc as the Windows Mobile platform it targeted is now obsolete and I don't think he sees it viable as a development environment for the desktop as the free Express versions of Visual Studio are available.

As you can see from the additional libraries link I have done a lot of work on Basic4ppc in the past, and in fact I maintain my own custom version of the IDE that targets only desktop applications. However I'm afraid that it is not available commercially.
 

mbatgr

Active Member
Licensed User
Longtime User
Hi agraham.
this is a nice tool. I have some server's implementatio in VB6 but is it possible to share the source code of the B4a-bridge.Plus.exe?
mike
 

mr23

Active Member
Licensed User
Longtime User
@agraham et al,
Has anyone tried transferring large files from the android device using the plus.apk app to the Plus.exe ? By large I mean for example 2Mb.
I'm running Win7 on the PC, and 4.0.3 on an HTC Sensation.
Less than the whole file is stored on disk on the PC. I've only tested some large jpgs so far. After around a half-Mb they get corrupted, like some of the packets are not getting either received or lost before stored.
I also tried a gen1 Kindle Fire running 10.1.3-otter CyanogenMod (Android 4.2.2), and again I did get some smaller files through just fine, but the large ones (17Mb pdf) did not arrive intact, generally running about somewhat larger than half-sized.
I also tried a Wildfire running some old Android (2.x) and a 814590 file ended up as 643042 bytes on the PC.
I also see errors such as the attached.
 

Attachments

  • b4abridgeplus_error.jpg
    b4abridgeplus_error.jpg
    21.7 KB · Views: 260

mr23

Active Member
Licensed User
Longtime User
I throttled the packet send rate down to 1 per 50ms, and more data arrived in the PC file.
So I backed it down to 5 per second, and the files arrive intact.
So, either something on the b4a stream.write side into a socket from a server on the device side can't handle this, or, more ?likely? the b4abridgeplus.exe code is dropping packets or overwriting buffer.
Anyway, at least now I have an idea of where the problem is...

@Erel @agraham
 

agraham

Expert
Licensed User
Longtime User
Yes, I've seen this but couldn't track where the problem was. As it uses TCP/IP there shouldn't be any loss in transmission and I couldn't see where on receive side the problem might be and didn't spend a lot of time on it as it wasn't important to me. B4ABridgePlus is written in Basic4ppc and I suspect there is a bug in its Network library to do with its DataAvailable flag as I have had similar trouble when I wrote a network Server with it. If I needed to do it again I would either rewritethe Network library to work asynchronously or do the while thing again in C#.

That "Key in Dictionary" error looks like it might be trying to open a file that is already open, but I'm very rusty.

I found an un-issued version 1.2 of B4ABridgePlus in my archives with increased buffer size and other small changes. I can't remember if it worked or not but you can try it.
 

Attachments

  • B4ABridgePlus1.2.zip
    68 KB · Views: 353
Last edited:

mr23

Active Member
Licensed User
Longtime User
@Rusty , I needed to move some files over and thought I'd try this tool. After finding the 'size/rate' limitation I figured it would be helpful to share that on this thread. Thanks for responding, @agraham . After slowing down the send rate, I could transfer arbitrarily large files (didn't try larger than 20MB), and I liked the right-click-send-to-pc feature of this utility.
 

Xfood

Expert
Licensed User
Although not really a library I thought that I would post this here for registered users.

B4A-BridgePlus.exe is an Android device File Manager program that runs on the desktop and communicates with an extended version of B4A-Bridge on the device. Using this you can copy files to and from desktop and device, delete files on desktop and device and install apks from the desktop onto the device - all without needing to use adb or DDMS.

B4A-BridgePlus.exe needs no installation (it is written in Basic4ppc) just put it somewhere together with folder.ico. Install B4A-BridgePlus1.00.apk on your device and run it just like the original B4A-Bridge where it will work with the Basic4android IDE as well as B4ABridgePlus.exe. It should be obvious how to drive B4A-BridgePlus. Right click on a file to do something to it.

There is a transparency issue with the folder icon on the ListView causing a black border that I don't know how to get rid of. Googling I've seen that other people have encountered this but I haven't found a definitive solution yet - but I haven't tried very hard! If you have an folder icon without any transparency you could try renaming it and using it instead of my folder.ico. If it looks nice then post it so I can use it too. :)

EDIT :- Version 1.1 posted. See post#7 for details.

EDIT :- Source and project posted. See post#27 for details.
it would be nice to convert this great utility B4ABridgePlus to b4j
 
Top