Keesver 23 Posted April 21 Hello, I'm using class TLocalReceiver from a Kastri sample application. When I create a new instance from this class I run into an exception: Project BroadCast.apk raised exception class EJNIFatal with message 'Java type com/delphiworlds/kastri/DWMultiBroadcastReceiverDelegate could not be found'. In the source code I find this: [JavaSignature('com/delphiworlds/kastri/DWMultiBroadcastReceiverDelegate')] JDWMultiBroadcastReceiverDelegate = interface(IJavaInstance) ['{1AD78992-D81F-48A4-B341-F82B43094B67}'] procedure onReceive(context: JContext; intent: JIntent); cdecl; end; which tells me the type should have been be registered (I have this file included in the uses of my test application). What am I missing here, do I have to add code to my application to register this class? Share this post Link to post
Dave Nottage 557 Posted April 21 11 hours ago, Keesver said: 'm using class TLocalReceiver from a Kastri sample application. When I create a new instance from this class I run into an exception: If you're using a demo app, you should not receive that error. The Java type comes from a java library from the Lib folder in Kastri, and which one will depend on the version of Delphi you are using. Delphi 10.x: dw-kastri-base.jar Delphi 11.x: dw-kastri-base-2.0.0.jar Delphi 12.x: dw-kastri-base-3.0.0.jar The relevant jar file would have been added to the Libraries node of the Android 32-bit target in Project Manager, e.g (Delphi 12.x): <snip> Which should be compiled in with the app, unless you're using Delphi 11.3, which requires a workaround. Share this post Link to post
Keesver 23 Posted April 22 I'm not using the demo app, I started a new project. I missed this step however, thanks for your info. 1 Share this post Link to post