@ -45,7 +45,7 @@ void main() async {
// };
WidgetsFlutterBinding.ensureInitialized();
await initializeService();
// await initializeService();
// Workmanager().initialize(
// callbackDispatcher, // The top level function, aka callbackDispatcher
// isInDebugMode: true // If enabled it will post a notification whenever the task is running. Handy for debugging tasks
@ -61,6 +61,7 @@ void onStart(ServiceInstance service) async {
service.stopSelf();
});
Timer.periodic(const Duration(seconds: 1), (timer) async {
final SharedPreferences prefs = await SharedPreferences.getInstance();
CallState state = await Telephony.instance.callState;