Android Tutorial B4A-Bridge a new way to connect to your device

Status
Not open for further replies.

Charlie

Member
Licensed User
Longtime User
Thanks for the suggestion. I looked: it is checked. I was not sure if it was checked during the last install, so I re-installed. No joy - the issue is still happening.
 

agraham

Expert
Licensed User
Longtime User
Running out of ideas here From what I can see B4A-Bridge is trying to open a file to write to in File.DirDefaultExternal which would be /mnt/sdcard/Android/data/anywheresoftware.b4a.babridge. The fact that it reports that it fails on temp2.apk is significant - it indicates that it attempted to open temp1.apk, caught the failure and tried again with temp2.apk which also failed but uncaught this time. The file it is failing to write could be the Designer apk as the IDE checks with B4A-Bridge which Designer version, if any, is installed and will download the latest version from the IDE if the device doesn't have it already.

DirDefaultExternal should be created automatically by Android the first time B4A-Bridge is run but it would seem that this is not happening. I'm afraid that I can't think of a reason why. Have you tried rebooting the tablet?
 

Charlie

Member
Licensed User
Longtime User
Yes, the tablet has been rebooted many times. I miss the older hardware where you could pull the battery to be certain of a complete reboot.

The directory /anywheresoftware.b4a.babridge has not even been created. Maybe I'll try creating one manually when I have more time to play.

I've eliminated everything but the tablet I think, as I can connect happily to my phone (running Android 2.3.3)

Thanks for trying, anyway! I can move forward by mounting the tablet as a drive and moving an APK, then dismounting and installing it. It's slow and clumsy, but will eventualy get the job done.
 

Charlie

Member
Licensed User
Longtime User
Can you post the logs when this crash happens?
I don't know how to do that. I can view the report and logs, but I don't have any idea how to save it or cut and paste it. The automated "send feedback for B4A Bridge" has been sent with the description "crash report from Charlie", if that helps...
 

Charlie

Member
Licensed User
Longtime User
Right click on the Logs pane.

Perhaps I did not make the original problem clear. The crash is on the tablet, not in the B4A editor. B4A reports nothing, there are no logs captured in the logs pane. The crash is on the tablet.

If I'm missing what you said, and you really want me to right click on the tablet... well... it has no mouse... so I'm still confused.
 

agraham

Expert
Licensed User
Longtime User
You said that "I can view the report and logs", I assumed that meant you could see it in the Logs pane of the IDE. If there is a crash on the tablet and the tablet is connected to the IDE, either by USB or B4A-Bridge then the reason for the crash and a stack trace should be visible in the Logs pane.
 

Charlie

Member
Licensed User
Longtime User
Sorry, as I said I'm pretty new to this. Here's as acurate a description as I can give:
B4A bridge on the tablet boots up happily. I push the button on the tablet that says "start wireless". I go to the PC, to the editor, choose tools > B4A bridge > Connect - wireless, and choose the tablet IP address. When I hit the O.K. button, there is no error message.
But on the tablet, it says "unfortunately B4A-bridge has stopped." I'm offered Report, or O.K. If I hit report, then hit preview, I can scroll down to system logs, event logs, etc. etc. These are the "logs" I was referring to. I have no idea how to get several pages of data from them, other than retyping for hours.
 

blong

Active Member
Licensed User
Longtime User
Cubieboard and B4A Bridge

I am currently developing on Android based Cubieboard which is NOT a telephone type device.

It has an RJ45 connector ... plus I can use a Wireless dongle.

B4A Bridge works well using Wifi BUT does not work over LAN.

Whilst I know Android phones don't have LAN how hard would it be to add LAN connectivity as well as wireless... happy to test

I think there will soon be many Android small computer boards as IMHO Android beats Linux anyday for development !
 

Charlie

Member
Licensed User
Longtime User
Can you send the crash report? I will check it in Google console.
Hi Erel.
There should be 2 copies there now with descriptions that read "report from charlie" and "report from charlie number 2".
 

blong

Active Member
Licensed User
Longtime User
LAN and B4A Bridge

Erel

Indeed it did work ... I was using the "previous" wifi IP address...:sign0161:

Minor enhancement would be if Bridge is connected then the LAN IP address is displayed as well as the message about Status : Connected.

Actually when Bridge starts and LAN is active then show IP address so user knows what to enter.

Anyway thanks for the help.. as always greatly appreciated.

Am enjoying Android on a Cubieboard ... perhaps one of the only users here doing such development.

 

blong

Active Member
Licensed User
Longtime User
Now it is giving an error

Erel

I connect the LAN cable and check Android settings and get IP address of 192.168.1.10 all seems OK.

Start B4A Bridge on Cubieboard and have following error

An error has occurred in sub:main_updateip (java line 477) java.lang.security exception:connectivity service: Neither user 10036 nor current process has android.permission.ACCESS_NETWORK_STATE. Continue ?

If I click YES I cannot connect with B4A.

Idea ?? (It did work for a while ??)
 

blong

Active Member
Licensed User
Longtime User
LAN again

Sorry .. did some more testing

If I click YES and continue then Click Start Wireless.. it says it is listening.

Then use Tools etc to connect and it connects OK..

i.e. Start Wireless seems to listen for LAN as well..

But after I click STOP button on IDE on bottomLHS then error pops up again ..
 

Charlie

Member
Licensed User
Longtime User
Erel, did you eventually get the files?

Also, I originally assumed that I had a common problem rather than something unusual. Would it make sense to move this to a new thread rather than pollute the B4A bridge tutorial?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
@blong, This is a bug in the Network library. It doesn't add this permission. In almost all cases it works properly as only the WIFI permission is needed. It will be fixed in the next update of the Network library. You can download the updated B4A-Bridge:
www.b4x.com/android/files/b4a_bridge.apk

@Charlie, I see the reports now. Thank you. It seems like a problem in your sd card. It all the time fails to create the required file. Make sure that it is writable.
 

blong

Active Member
Licensed User
Longtime User
Bug

Thanks Erel... will get updated B4A bridge program.

Regards
 

Charlie

Member
Licensed User
Longtime User
Thanks Erel. Even though I happily write to the card with other applications and can manually put an APK file on it and install from that APK, I tried swapping the card with another. Same issue. I tried a third card - still no joy.

Can you tell me the path it should create and then use?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…