New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Service does not start automatically after reboot #2
Comments
can you provide more detailed information? |
@delacernamarimar try to run the application at least 1 time directly from the home screen without a studio. Because the plugin requires a callback handle ID for the method to be executed, while the callback handle ID for the same method will have different values when the debuger is attached. |
will try, will let you know |
Same stuck at preparing |
@delacernamarimar , it is an indication that the background service is running successfully. To update the notification, you can use the following method ...
import 'package:flutter_background_service/flutter_background_service.dart';
void main(){
WidgetsFlutterBinding.ensureInitialized();
FlutterBackgroundService.initialize(startService);
runApp(MyApp());
}
void startService(){
WidgetsFlutterBinding.ensureInitialized();
final service = FlutterBackgroundService();
// update notification info
service.setNotificationInfo(
title: "My App",
content: "Hello world",
);
} |
Attached is the logcat and the emulator screenshot. full logcat from reboot 2020-09-22 01:47:02.141 502-572/? I/SystemServerTimingAsync: InitThreadPoolExec:Update app-ops uidState in case package id.flutter.flutter_background_service_example changed |
@delacernamarimar I just updated the plugin, can you try again using the latest version and tell me the result? |
Sure my pleasure will update you. |
the latest version should be |
Working now tested in API 30 with notification but for API 23 no notification but the audio is working in the background. |
The plugin will use a background service if the application is run on a device with an OS under API 26 (Oreo), otherwise it will use the foreground service to overcome Background Execution Limits. |
closed this issue because it was solved |
The default package not working in my end tried API levels 26, 28, and 29. Working when run from the studio but when rebooting not working. Working with android as for now but will do IOS later, any suggestions?
The text was updated successfully, but these errors were encountered: