Hey guys, I needed the service to keep working even if the user closes the app or reboots the phone, so I set the service to "remote" as suggested in another issue by adding the following inside my AndroidManifest.
<service android:name="com.pravera.flutter_foreground_task.service.ForegroundService" android:process=":remote"/>
and it works perfectly for my needs, but I would like to be able to stop the service if the user logs out inside the app, and since it's running in a remote process FlutterForegroundTask.stopService() doesn't seem to do anything anymore (unless I were to call it from inside my Task handler. Is there a proper way to achieve this? I don't have a lot of knowledge when it comes to native code.
Hey guys, I needed the service to keep working even if the user closes the app or reboots the phone, so I set the service to "remote" as suggested in another issue by adding the following inside my AndroidManifest.
<service android:name="com.pravera.flutter_foreground_task.service.ForegroundService" android:process=":remote"/>
and it works perfectly for my needs, but I would like to be able to stop the service if the user logs out inside the app, and since it's running in a remote processFlutterForegroundTask.stopService()
doesn't seem to do anything anymore (unless I were to call it from inside my Task handler. Is there a proper way to achieve this? I don't have a lot of knowledge when it comes to native code.