I’m doing some tests with services. My code in local service is just:
function TDM.AndroidServiceStartCommand(const Sender: TObject;
const Intent: JIntent; Flags, StartId: Integer): Integer;
Result := TJService.JavaClass.START_STICKY;
But service doesn’t restart when I close the app. I know that a local service runs in the same process as the app so it is normal the service finish, but START_STICKY should start the service automatically but this is not happening. The service only starts automatically when I open the application again.
Is this a Delphi issue? In applications made in Java the service starts correctly.
I’m running on Android 10.