home_widget icon indicating copy to clipboard operation
home_widget copied to clipboard

Widget not update background when app killed ( home_widget: ^0.4.0-alpha.0 )

Open Jasco07122021 opened this issue 1 year ago • 2 comments

My device is Android ( Samsung S10 )

void main() { HomeWidget.registerInteractivityCallback(backgroundCallbackHomeWidget); ... }

@pragma('vm:entry-point') Future backgroundCallbackHomeWidget(Uri? uri) async { print('uri $uri ${uri?.host}'); await AppWidgetBackground.initCall(); bool isRegistered = locator.isRegistered<HomeWidgetProvider>(); if (!isRegistered) { try { await configureDependenciesHomeWidget(envDev); isRegistered = true; } catch (e) { log('Error $e'); AppWidgetBackground.closeWithoutInject(); } } if (isRegistered) { AppWidgetBackground.init(locator, uri); } }

Jasco07122021 avatar Oct 09 '23 06:10 Jasco07122021

Is the callback invoked by the widget?

ABausG avatar Oct 12 '23 15:10 ABausG

Sorry, it worked, but the widget refreshes in 3.4 seconds on the first click after the app is closed or the first widget is created. I think it takes time to connect the flutter engine. Can we add a new function for this bad case?

Jasco07122021 avatar Oct 18 '23 09:10 Jasco07122021