Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Exception on RegisterNatives


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Last Post: Sep 13, 2017 2:16 PM Last Post By: Dave Nottage
Manon Camboulives

Posts: 4
Registered: 10/8/17
Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 7:29 AM
Hi,

I am currently trying to develop a Firemonkey application in Delphi XE8 that will have to read some barcodes.
I started thanks to this conversation on the 75E : [Consuming a 3rd Party Android API (Honeywell Datacapture.jar)| https://forums.embarcadero.com/thread.jspa?threadID=205636 ,
but I encountered an exception that I do not understand. It is raised when I try to use the "RegisterNatives"
method, on the "RegisterDelphiNativeMethods" procedure. The error message is the following one :
"The BarCode.apk project triggered the exception class Aborted (6)."

I tried to migrate the application on Delphi 10.2 (Tokyo), but the same thing happened. And with all the users
permissions too... So if someone has encountered the same problem and solved it, I am interested about the
explanation, because I have no informations in debug mode.

Just ask me if some part of code is needed, but almost everything is on the forum I quoted above.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 9:02 AM   in response to: Manon Camboulives in response to: Manon Camboulives
Am 12.09.2017 um 16:29 schrieb Manon Camboulives:
Hi,

I am currently trying to develop a Firemonkey application in Delphi XE8 that will have to read some barcodes.
I started thanks to this conversation on the 75E : [Consuming a 3rd Party Android API (Honeywell Datacapture.jar)| https://forums.embarcadero.com/thread.jspa?threadID=205636 ,
but I encountered an exception that I do not understand. It is raised when I try to use the "RegisterNatives"
method, on the "RegisterDelphiNativeMethods" procedure. The error message is the following one :
"The BarCode.apk project triggered the exception class Aborted (6)."

I tried to migrate the application on Delphi 10.2 (Tokyo), but the same thing happened. And with all the users
permissions too... So if someone has encountered the same problem and solved it, I am interested about the
explanation, because I have no informations in debug mode.

Just ask me if some part of code is needed, but almost everything is on the forum I quoted above.

Hello,

did you already try this one:

https://github.com/Spelt/ZXing.Delphi

Greetings

Markus
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 2:05 PM   in response to: Markus Humm in response to: Markus Humm
Markus Humm wrote:

did you already try this one:

https://github.com/Spelt/ZXing.Delphi

He's using a Jar for specific hardware in the device. Using ZXing here is not going to help.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2017 2:12 PM   in response to: Manon Camboulives in response to: Manon Camboulives
Manon Camboulives wrote:

The error message is the following one : "The BarCode.apk project triggered the exception class Aborted (6)."

If you check Monitor, there should be additional information about the error. Please indicate exactly which line of
code this occurs on.

Also, are you sure you actually need to subclass the native activity? I started out that way with the Symbol EMDK
because their Java examples did that, however I discovered soon after that it wasn't necessary. I did however need to
write some Java code because I needed to create a descendant of one of their classes (can't remember which, and I'm not
at the clients premises now so I don't have the code in front of me).

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Manon Camboulives

Posts: 4
Registered: 10/8/17
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 6:12 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:
Manon Camboulives wrote:

The error message is the following one : "The BarCode.apk project triggered the exception class Aborted (6)."

If you check Monitor, there should be additional information about the error. Please indicate exactly which line of
code this occurs on.

Also, are you sure you actually need to subclass the native activity? I started out that way with the Symbol EMDK
because their Java examples did that, however I discovered soon after that it wasn't necessary. I did however need to
write some Java code because I needed to create a descendant of one of their classes (can't remember which, and I'm not
at the clients premises now so I don't have the code in front of me).

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Here I put the entire method from where the exception is raised, more precisely at the 23rd line ( PEnv^.RegisterNatives(PEnv, ActivityClass, @NativeMethods, 1) ):

procedure THeaderFooterForm.RegisterDelphiNativeMethods;
var
  PEnv: PJNIEnv;
  ActivityClass: JNIClass;
  NativeMethods: JNINativeMethod;
  res: Integer;
begin
 
  try
 
    Log.d('Starting the registration JNI stuff');
    Toast('starting', true);
    PEnv := TJNIResolver.GetJNIEnv;
 
    Log.d('Registering interop methods');
 
    NativeMethods.Name := 'onBarCodeCompleteNative';
    NativeMethods.Signature := '(Ljava/lang/String;)V';
    NativeMethods.FnPtr := @onBarCodeCompleteNative;
 
    ActivityClass := TJNIResolver.GetJavaClassID('com/winarhi/nativeactivitysubclass');
 
    if PEnv^.RegisterNatives(PEnv, ActivityClass, @NativeMethods, 1) = 0 then
      Toast('success', true)
    else
      Toast('failure', true);
 
    PEnv^.DeleteLocalRef(PEnv, ActivityClass);
    Toast('ending', true);
  except
   on e:Exception do
   begin
     Showmessage(e.ClassName + ' - ' + e.Message);
   end;
  end;
end;


When it is raised in debug mode, I get this informations from the call stack :

:B6D23030 tgkill()
:B6D20C40 pthread_kill()
:B6CFD3DE raise()
:B6CFA590 __libc_android_abort()
:B6CF84E4 abort()
:B4A0AA3C ??()
:B4A0AA3C ??()

And the file opened is libc.so.


Finally, the logs since the launch of the application until the exception are following :

09-13 11:46:05.394: I/Finsky(15678): [1] com.google.android.finsky.verifier.impl.cb.c(110): Verification complete: id=68, package_name=com.embarcadero.HeaderFooterApplication
09-13 11:46:06.279: I/PackageManager.DexOptimizer(984): Running dexopt (dex2oat) on: /data/app/vmdl1166667544.tmp/base.apk pkg=com.embarcadero.HeaderFooterApplication isa=arm vmSafeMode=false debuggable=true oatDir = /data/app/vmdl1166667544.tmp/oat bootComplete=true
09-13 11:46:09.822: I/ActivityManager(984): Force stopping com.embarcadero.HeaderFooterApplication appid=10115 user=-1: uninstall pkg
09-13 11:46:09.967: I/PackageManager(984): Package com.embarcadero.HeaderFooterApplication codePath changed from /data/app/com.embarcadero.HeaderFooterApplication-1 to /data/app/com.embarcadero.HeaderFooterApplication-2; Retaining data and using new
09-13 11:46:09.968: I/ActivityManager(984): Force stopping com.embarcadero.HeaderFooterApplication appid=10115 user=-1: replace pkg
09-13 11:46:09.969: W/PackageManager(984): Code path for com.embarcadero.HeaderFooterApplication changing from /data/app/com.embarcadero.HeaderFooterApplication-1 to /data/app/com.embarcadero.HeaderFooterApplication-2
09-13 11:46:09.969: W/PackageManager(984): Resource path for com.embarcadero.HeaderFooterApplication changing from /data/app/com.embarcadero.HeaderFooterApplication-1 to /data/app/com.embarcadero.HeaderFooterApplication-2
09-13 11:46:10.447: W/PackageManager(984): Couldn't remove dex file for package:  at location /data/app/com.embarcadero.HeaderFooterApplication-1/base.apk, retcode=-1
09-13 11:46:10.448: I/ActivityManager(984): Force stopping com.embarcadero.HeaderFooterApplication appid=10115 user=0: pkg removed
09-13 11:46:10.520: D/PackageChangeReceiver(2363):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:10.522: V/Utils(2363): com.embarcadero.HeaderFooterApplication not found in black list, return false
09-13 11:46:10.523: D/PackageChangeReceiver(2363):  Package Removed:com.embarcadero.HeaderFooterApplication
09-13 11:46:10.534: D/HoneywellMdmService(1406): pkg status changed  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:10.736: D/PackageChangeReceiver(15828):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:10.736: D/PackageChangeReceiver(15828):  Package Removed:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.018: D/PackageChangeReceiver(2363):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.019: D/PackageChangeReceiver(2363):  Package Added :com.embarcadero.HeaderFooterApplication whiteListFlag = false FuncStatusFlag = false
09-13 11:46:11.020: V/Utils(2363): com.embarcadero.HeaderFooterApplication not found in black list, return false
09-13 11:46:11.021: D/HoneywellMdmService(1406): pkg status changed  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.081: D/Wear_Controller(3209): Received broadcast action=android.intent.action.PACKAGE_REMOVED and uri=com.embarcadero.HeaderFooterApplication
09-13 11:46:11.392: D/HPRG(17131): Removing key: pm:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.393: D/HPRG(17131): ACTION_PACKAGE_ADDED: packageName - com.embarcadero.HeaderFooterApplication
09-13 11:46:11.461: D/PackageChangeReceiver(15828):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.461: D/PackageChangeReceiver(15828):  Package Added :com.embarcadero.HeaderFooterApplication
09-13 11:46:11.554: I/Provisioner(3196): ProvisionerReceiver: package added=com.embarcadero.HeaderFooterApplication
09-13 11:46:11.555: I/ActivityManager(984): START u0 {flg=0x10000000 cmp=com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity} from uid 2000 on display 0
09-13 11:46:11.555: D/Provisioner(3196): sendIntent com.embarcadero.HeaderFooterApplication found matching APKs=0
09-13 11:46:11.592: I/ActivityManager(984): Start proc 17154:com.embarcadero.HeaderFooterApplication/u0a115 for activity com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity
09-13 11:46:11.639: D/Wear_Controller(3209): Received broadcast action=android.intent.action.PACKAGE_ADDED and uri=com.embarcadero.HeaderFooterApplication
09-13 11:46:11.671: D/PackageChangeReceiver(2363):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.673: D/HoneywellMdmService(1406): pkg status changed  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.686: I/Finsky(15678): [1] com.google.android.finsky.utils.PermissionPolicies$PermissionPolicyService.onStartCommand(18): post-install permissions check for com.embarcadero.HeaderFooterApplication
09-13 11:46:11.696: D/CheckUpdateFileReceiver(17105): com.embarcadero.HeaderFooterApplication has been upgraded
09-13 11:46:11.726: I/Finsky(15678): [1] com.google.android.finsky.externalreferrer.d.run(9): Package state data is missing for com.embarcadero.HeaderFooterApplication
09-13 11:46:11.749: W/linker(17154): /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so: unused DT entry: type 0xf arg 0x10693
09-13 11:46:11.749: W/linker(17154): /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so: is missing DT_SONAME will use basename as a replacement: "libHeaderFooterApplication.so"
09-13 11:46:11.754: D/PackageChangeReceiver(15828):  pkg name:com.embarcadero.HeaderFooterApplication
09-13 11:46:11.782: I/FontsPackageChangeOp(3209): Package com.embarcadero.HeaderFooterApplication has no metadata
09-13 11:46:23.001: I/ActivityManager(984): Displayed com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity: +11s420ms
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #07 pc 0096fc7d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #08 pc 0096fb5d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #09 pc 0078a5ff  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #10 pc 008df4bd  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #11 pc 0078abe7  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #12 pc 00785917  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #13 pc 0091bf77  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #14 pc 008831d9  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #15 pc 00884e3b  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #16 pc 0088fc9f  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #17 pc 0088f419  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:38.964: A/art(17154): art/runtime/java_vm_ext.cc:410]   native: #18 pc 006cac93  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.560: A/art(17154): art/runtime/runtime.cc:366]   native: #10 pc 0096fc7d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.560: A/art(17154): art/runtime/runtime.cc:366]   native: #11 pc 0096fb5d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #12 pc 0078a5ff  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #13 pc 008df4bd  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #14 pc 0078abe7  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #15 pc 00785917  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #16 pc 0091bf77  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #17 pc 008831d9  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #18 pc 00884e3b  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #19 pc 0088fc9f  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #20 pc 0088f419  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.561: A/art(17154): art/runtime/runtime.cc:366]   native: #21 pc 006cac93  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #12 pc 0096fc7d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #13 pc 0096fb5d  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #14 pc 0078a5ff  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #15 pc 008df4bd  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #16 pc 0078abe7  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #17 pc 00785917  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #18 pc 0091bf77  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #19 pc 008831d9  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #20 pc 00884e3b  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #21 pc 0088fc9f  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.562: A/art(17154): art/runtime/runtime.cc:366]   native: #22 pc 0088f419  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:46:43.563: A/art(17154): art/runtime/runtime.cc:366]   native: #23 pc 006cac93  /data/app/com.embarcadero.HeaderFooterApplication-2/lib/arm/libHeaderFooterApplication.so (???)
09-13 11:48:39.380: W/ActivityManager(984): Activity pause timeout for ActivityRecord{8352da3 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity t300}
09-13 11:48:49.391: W/ActivityManager(984): Activity stop timeout for ActivityRecord{8352da3 u0 com.embarcadero.HeaderFooterApplication/com.embarcadero.firemonkey.FMXNativeActivity t300}
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 6:30 AM   in response to: Manon Camboulives in response to: Manon Camboulives
Manon Camboulives wrote:

Here I put the entire method from where the exception is raised, more precisely at the 23rd line (
PEnv^.RegisterNatives(PEnv, ActivityClass, @NativeMethods, 1) ):

I don't see any log messages in your log output like:

"Starting the registration JNI stuff"

Are you sure you're providing the correct parts of the log, or does it not even execute that part?

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Manon Camboulives

Posts: 4
Registered: 10/8/17
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 6:56 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:

I don't see any log messages in your log output like:

"Starting the registration JNI stuff"

Are you sure you're providing the correct parts of the log, or does it not even execute that part?

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

Well, yes it is the correct part of the log, but I do not think I wrote somewhere "start the registration of the JNI stuff", or something like this... How do you do that ? I think I really missed something
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 6:58 AM   in response to: Manon Camboulives in response to: Manon Camboulives
Manon Camboulives wrote:

Well, yes it is the correct part of the log, but I do not think I wrote somewhere "start the registration of the JNI
stuff", or something like this... How do you do that ? I think I really missed something

I don't see it in the log you presented in your last reply, so yes, you missed something.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 7:07 AM   in response to: Manon Camboulives in response to: Manon Camboulives
Manon Camboulives wrote:

Well, yes it is the correct part of the log, but I do not think I wrote somewhere "start the registration of the JNI
stuff", or something like this... How do you do that ? I think I really missed something

Also, you missed this question:

"Also, are you sure you actually need to subclass the native activity?"

Is there a link to the documentation for the API you're using? It may be that you don't need to subclass the native
activity at all, saving a whole bunch of headaches.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Manon Camboulives

Posts: 4
Registered: 10/8/17
Re: Exception on RegisterNatives  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 8:13 AM   in response to: Dave Nottage in response to: Dave Nottage
Dave Nottage wrote:

Also, you missed this question:

"Also, are you sure you actually need to subclass the native activity?"

Is there a link to the documentation for the API you're using? It may be that you don't need to subclass the native
activity at all, saving a whole bunch of headaches.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com

You are right. I think I need to subclass the native activity because I do not know how to deal with the java barcode events on Delphi. You can found the api following this link : http://download.salamandre.tm.fr/api/ .

Edited by: Manon Camboulives on Sep 13, 2017 8:14 AM
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: Exception on RegisterNatives [Edit]  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2017 2:16 PM   in response to: Manon Camboulives in response to: Manon Camboulives
Manon Camboulives wrote:

You are right. I think I need to subclass the native activity because I do not know how to deal with the java barcode
events on Delphi. You can found the api following this link : http://download.salamandre.tm.fr/api/ .

Going by that documentation, you don't need to subclass the native activity. At first glance, it looks like you don't
need to write any Java code, either. You will however need to write classes that implement the BarcodeDeviceListener,
CreatedCallback, BarcodeListener and TriggerListener interfaces.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02