B4A Library ByteConverter library

rasaliad

Member
Licensed User
Longtime User
Hi, i want to test the RDC demo: Install de ByteConverter Lib in a AddLibs folder and add this path to B4A, the Lib is checked in the libraries tab. I open the ByteConverter Demo then when compile get the following error: I'm using the B4A V5.8 Trial Version

The Javac.exe path is: C:\Program Files\Java\jdk1.8.0_77\bin\javac.exe

*** Remote compilation mode ***
B4A version: 5.80
Parsing code. (0.00s)
Compiling code. (0.10s)
Compiling layouts code. (0.00s)
Compiling debugger engine code. (1.12s)
Sending data to remote compiler. Error
step: Compiling generated Java code.
javac 1.7.0
src\anywheresoftware\b4a\agraham\byteconverter\main.java:344: error: cannot find symbol
public static anywheresoftware.b4a.agraham.byteconverter.ByteConverter _conv = null;
^
symbol: class ByteConverter
location: package anywheresoftware.b4a.agraham.byteconverter
1 error


Then i open the RemoteServerClient Demo, the ByteConverter Lib is installed (Both files, .jar and .xml) in the Addlibs Folder. When complie get this error:

*** Remote compilation mode ***
B4A version: 5.80
Parsing code. (0.07s)
Compiling code. (0.19s)
Compiling layouts code. (0.01s)
Compiling debugger engine code. (1.79s)
Sending data to remote compiler. Error
step: Compiling generated Java code.
javac 1.7.0
src\b4a\example\dbrequestmanager.java:71: error: package anywheresoftware.b4a.agraham.byteconverter does not exist
public anywheresoftware.b4a.agraham.byteconverter.ByteConverter _bc = null;
^
1 error

What i'm doing wrong?

Thanks in advnaced,

Rafael Liriano
 

rasaliad

Member
Licensed User
Longtime User
You should use the full version instead of the trial version.

Hi, I just buy the upgrade, but I do it with the following email to use paypal, how can you match this upgrade to may account?

Thanks

Rafael Liriano
 
Last edited by a moderator:

engvidal

Member
Licensed User
Longtime User
I am trying to use the ByteConverter lib to send a message using the mqtt library.

The publish needs the message to be in array of bytes.

I tried:

B4X:
  Dim MyMessage As String = "Hi"
   Dim bc As ByteConverter
   Dim pack() As Byte = bc.StringToBytes(MyMessage,"UTF8")
     
   mqtt.Publish(mytopic, pack);    // error !!

but there is an error. Can anyone help ?
 

engvidal

Member
Licensed User
Longtime User
Hi. I found the error. Just a typing mistake, BUT I have another problem, now receiving messages:

Using this sub:

B4X:
Private Sub mqtt_MessageArrived (Topic As String, Payload() As Byte)
   Dim obj As Object = serializator.ConvertBytesToObject(Payload)
 Dim s As String = obj

   Label2.Text = s
     
End Sub

Just at start up (and after that, if I say to continue, on each message arriving):

java.io.IOException:

 
Hello ,
I created an app that communicates via tcp with an instrument using also the byteconverter 1.1 library on the android 5 version.
The problem is that it doesn't work with android 9 or higher.
Can you help me please.
thank you
 

Attachments

  • error.jpg
    75.4 KB · Views: 246

Alessandro71

Well-Known Member
Licensed User
Longtime User
You land on this page by clicking on ByteConverter in the Libraries tab, but differently from the other libs, the first post does not contains any useful info about it: no list of Subs, no "How to use" section.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…