Jump to content
Keesver

(Kastri) Receiver not registered: null exception when creating TLocalReceiver

Recommended Posts

Hello,

 

I'm trying to get the Foreground service demo application to work in Delphi 12. Therefore I copied the files to a new project, checked the manifest files and I got everything set as it should. However when I start the service, an exception is raised inside the service create method:

 

constructor TServiceModule.Create(AOwner: TComponent);
begin
  inherited;
  TOSLog.d('TServiceModule.Create - 1');
  FLocalReceiver := TLocalReceiver.Create(Self);  <-- java.lang.IllegalArgumentException: Receiver not registered: null
  TOSLog.d('TServiceModule.Create - 2');
  FService := TJService.Wrap(System.JavaContext);
  TOSLog.d('TServiceModule.Create - 3');
  CreateNotificationChannel;
  TOSLog.d('TServiceModule.Create - 4');
end;

I think I'm missing something, what should be done to 'Register' a receiver?

 

Thanks

Share this post


Link to post

Fixed it by adding dw-kastri-base-3.0.0.jar to the project.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×