Open joharputr opened 1 year ago
I assume you copy the code of initializeService
method from the example.
you need to remove the service.startService();
at the and of the method. Because this command will start the service.
even when you set autoStart:false
, the onstart
method will invoke after that command.
Future<void> initializeService() async {
final service = FlutterBackgroundService();
....
....
....
await service.configure(
androidConfiguration: AndroidConfiguration(
autoStart: false,
// others config
),
iosConfiguration: IosConfiguration(
// auto start service
autoStart: false,
// others config
),
);
// service.startService(); <<<<== Remove this line
}
There's no startService() now(version 5.05), so, how to start it?
auto start false not working ,
I set auto start: false but still starting service