sAleksovski / react-native-android-widget

Build Android Widgets with React Native
https://sAleksovski.github.io/react-native-android-widget/
MIT License
546 stars 22 forks source link

widget ui does not render on android 12 #59

Closed moeinrahimi closed 6 months ago

moeinrahimi commented 6 months ago

hi my widget works fine on android 14, but on android 13 there is no rendered ui but when you touch the applications starts, it looks like the functionality is there but not ui itself.

moeinrahimi commented 6 months ago

also my widget sends an http request could that be related?

sAleksovski commented 6 months ago

I can't tell from your description.

Can you try without the http request? Can you share some logs? Can you share your widget and widgetTaskHandler? (Or even better, a minimal example widget that reproduces the issue)

linhnt29 commented 6 months ago

I'm using background image and get size from widgetInfo. Worked fine on Android 13 but with Android 12, when add widget to homepage, it displayed nothing. Debug via Android Studio I got an error " java.lang.IllegalArgumentException: width and height must be > 0" Metro service got message that widgetInfo width & height = 0.

sAleksovski commented 6 months ago

Looks like some view is too small. It probably is not related to Android version, but to the phone/emulator screen size. Some view cannot be shown because the widget is too small.

Try deleting parts of the widget and you will see which part causes the error.

Also, Can you try without the http request? Can you share some logs? Can you share your widget and widgetTaskHandler? (Or even better, a minimal example widget that reproduces the issue)

sAleksovski commented 6 months ago

I'm closing this since there is no way to reproduce it.

Feel free to reopen it with an example widget and steps to reproduce.