Closed Abiramisaro closed 4 months ago
This is not related to the library. It just responds to Android events.
Can you share a screen recording? Can you try a widget from a different app?
@sAleksovski now its this issue cleared by enter a correct package name.
but now the widget is opened and suddently when i come out from the widget configure screen the widget is deleted . I console that for debugging. here i attach a video and screenshots . pls help to sort it out
@sAleksovski in the Make Widget configurable page declared a note we have to the fallback configuration to avoid widget deletion after we add widget to the homescreen... pls explain this one
The widget configuration screen is optional. Since your screen is empty, you can make the widget not configurable.
If you want your widget to be configurable, you will need to add some button in the configuration screen, which will call setResult('ok')
.
The default behavior when going back from the widget configuration screen is to remove the widget. You must call setResult('ok')
for the widget to stay on the screen.
Check the configuration screen in the example app.
Closing since it appears that you did not call setResult('ok')
before exiting the configuration screen.
If you still have the problem, reopen the issue with example code reproducing the issue.
Hi, by console in the switch statements i get the logs "widget added" and "widget deleted" the widgetTaskHandler function : export async function widgetTaskHandler(props: WidgetTaskHandlerProps) { const widgetInfo = props.widgetInfo; console.log(widgetInfo,"widgetInfo....") const Widget = nameToWidget[widgetInfo.widgetName as keyof typeof nameToWidget];
switch (props.widgetAction) { case 'WIDGET_ADDED': console.log("WIDGET ADDED>>") props.renderWidget( );
break;
} }