Example to consider - B4A meets B4J

barx

Well-Known Member
Licensed User
Longtime User
I guess this post is really for Erel to note, but it is open for anyone to discuss the concept.

So, thinking of a little app and I'm thinking the solution will lay with B4J. And so, when creating examples in the future please consider B4A to B4J communication. I'm thinking syncing a database between an Android app (B4A) and pc prog (B4J) over a local LAN. I'm sure this will involve something like sockets and such, but I have never used anything like that so wouldn't know where to start.

Thanks for reading.

Waiting in anticipation.......
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4J network related libraries will be exactly the same as B4A libraries. This means that the Network library and AsyncStreams and the other AsyncStreams related modules will be supported on both apps.

Hopefully you will be able to use the exact same "network" code in both B4J and B4A. Check AsyncStreamsObject for a good example of how to send objects.
 

barx

Well-Known Member
Licensed User
Longtime User
Sounds good Erel, I will check out the AsyncStreamsObject, thanks!
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The example is ready:
SS-2013-11-14_13.26.52.png


The nice thing about it is that the code is almost identical in B4J and B4A.

I will upload it when b4J is released (The Android app is the same as the example attached to AsyncStreamsObject tutorial).
 

barx

Well-Known Member
Licensed User
Longtime User
Oh my days, I think I just got a little too excited...
 
Top