1
votes

I am working on project with FT232RL using d2xx Android drivers, on firemonkey XE7.

Android tablet <-> USB FT232RL card.

I manage to create unit (Androidapi.JNI.d2xx.pas) from d2xx.jar using Java2OP,add it to Libraries, compile and build. But when i try to use some class i only get errors. I try:

context:= SharedActivityContext;
D2xxManager := TJD2xxManager.Create; // fragmentation error
devCount := D2xxManager.createDeviceInfoList(context);

and

D2xxManager :=  TJD2xxManager.JavaClass.getInstance(SharedActivityContext);

devCount := D2xxManager.createDeviceInfoList(SharedActivityContext);
//Java class JD2xxmanager could not be found

Created Unit Androidapi.JNI.d2xx.pas main form Unit1

Is my Androidapi.JNI.d2xx.pas failing or wrong way to call java bridged class ? Did anyone manage to do something like this ?

1
What are the errors you get?jny
In first example I get "fragmentation error" on TJD2xxManager.Create, and App crashed and restart android tablet. In second example I get "Java class JD2xxmanager could not be found" but much nicer in Android popup window.Toni Tabak

1 Answers

0
votes

Copy D2xx.jar to same directory of code Follow instruction in this link to add a Java library file (.jar) to Android application. Works like a charm.