Android Tutorial B4A-Bridge source code

B4A-Bridge is made of two components. One component is running on the device and the other is embedded in the IDE.
The device side is the server side. It waits for connections and when a connection is established it handles the "action" messages.

The code itself is made of a simple activity:

arSsfzqjKtq2_v9Moofj4SgiWWet6WOFH-P1Z2NuxbMo4yB6yqsGaoioptbDdbMCZw4=h900



And a service that is doing most of the job.
All the network communication is handled by an AsyncStreams object. AsyncStreams are very useful for networking and other external communication.

In this case the AsyncStreams object is initialized in prefix mode. In this mode we always receive complete messages which makes things simpler.
See this tutorial for more information: AsyncStreams Tutorial

This code is a good example for networking and working with service.
You are welcomed to examine the code and ask any question about it.

Latest version source code is attached.
 

Attachments

  • B4A-Bridge-source.zip
    29.5 KB · Views: 708
Last edited:

moster67

Expert
Licensed User
Longtime User
I might be wrong but it seems to me that the file "B4A-BridgeLastVersionWithBluetooth" in the first post does not contain the bluetooth-code....
 

MbedAndroid

Active Member
Licensed User
Longtime User
It's possible to update the source to latest version (2.60) OR add the multiscreen attribute in the manifest?
Tnx
 
Top