Android Question B4A newbie vs JAVA/JAR files and Serial comms

bignoze

Member
Licensed User
I'm a freshly licenced B4A newbie having a crack at writing my first app - reading RFID chips with a customised Android tablet RFID reader.

I have no JAVA knowledge. I do have a fair whack of PHP experience. B4A looks the goods and I have followed the introductory tutorials with success.

The tablet manufacturer has provided some demo Java programs and a JAR file 'Serialport-module.jar' which calls Native C files using 'System.loadLibrary("serial_port");' to power up the reader.

Looking at the other JAVA demo files it appears I can use the standard B4A Serial library to Inputstream to /dev/ttyS4 once the reader is powered up.

My question is do I need someone with B4A and JAVA knowledge on the job forums to write a B4A wrapper so that I can load the Classes and Methods from that JAR file?

My B4A newbie guess is YES.

Or am I over complicating things?
 

DonManfred

Expert
Licensed User
Longtime User
Welcome!

Can you upload the provided jar and any existing example code?

If the file is too large (500kb+) then you need to put the file on Dropbox, GoogleDrive or similar and post the Downloadlink.
 
Upvote 0

bignoze

Member
Licensed User
Thanks for getting back to me.

I have attached the JAR file as well as 3 of the Java files that call ModuleManager.newInstance().setUHFStatus(true) which seems to be the method that powers up the RFID reader.
 

Attachments

  • Serialport-module.jar
    6.1 KB · Views: 291
  • ConnectRs232.java
    6.4 KB · Views: 334
  • BaseActivity.java
    3.6 KB · Views: 300
  • MainActivity.java
    15.6 KB · Views: 307
Upvote 0

bignoze

Member
Licensed User
Hello again.

I've attached the Java development guide - I've export it to PDF first.

Is this sufficient? There is also a raft of web pages detailing each of the Java programs and Classes etc.

It might take me a while to hunt down a URL for those - I downloaded a bunch of stuff from Rodinbell's website when I was first asked to develop the app and have been looking through it localally.
 

Attachments

  • 1D_RFID-Development Guide.pdf
    118.8 KB · Views: 564
Upvote 0

bignoze

Member
Licensed User
Apologies - there's a raft of JAVA files in the demo - like over 50

I've attached ReaderHelper.java

I am hoping that once I can power up the RFID reader I can talk to it from B4A - and use the JAVA demo programs as a guide for B4A development.
 

Attachments

  • ReaderHelper.java
    66.4 KB · Views: 297
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
This file is missing a lot of other dependecies.

Upload the COMPLETE set of code and libraries available. Including complete example projects. Zip it all together.

Hard to help here with this less information you provide about the Device you are using, without knowing exact SDK details.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Looking at the other JAVA demo files it appears I can use the standard B4A Serial library to Inputstream to /dev/ttyS4 once the reader is powered up.
that´s maybe the correct way.

The jar you provided contains methods to enable the Device. Some properties, not much.
The attached lib contains the ModuleManager and SerialPortFinder

Hope it helps get started.
 

Attachments

  • RFIDserialV0.01.zip
    2.5 KB · Views: 297
Upvote 0

bignoze

Member
Licensed User
Gday Manfred,

okay - thanks for the assist - I've probably underestimated the complexity of loading an external JAR file by a long way.

It's Saturday night here in Sydney and I'm pretty well cooked after scratching my head all day over this stuff.

I will check with my boss next week before I start uploading up some other companies software ..

Meantime I will have a look at what you've provided and get back to you next week - I just had a quick decko and your ZIP file and looks familiar from my research through the forums - I will let you know how I went implementing it next week.

Thanks again for the hand - and have a beaut weekend when you get to it.
 
Upvote 0
Top