Assigned
Status Update
Comments
di...@gmail.com <di...@gmail.com> #2
Hello,
I'm only a little familiar with Power Apps. Is your app a mobile app or a web app?
This link
The primary
If your app does not work on Android mobile devices, you can also consider the
di...@gmail.com <di...@gmail.com> #4
They're static.
Description
Version used: 1.1.0
Devices/Android versions reproduced on: Pixel 7 / Android 14
A widget hierarchy like this causes problems in release mode:
internal class SimpleMetronomeWidgetThemed : SimpleMetronomeWidget(scheme = WidgetScheme.THEMED)
internal class SimpleMetronomeWidgetNeutral : SimpleMetronomeWidget(scheme = WidgetScheme.NEUTRAL)
internal open class SimpleMetronomeWidget(private val scheme: WidgetScheme) : GlanceAppWidget()
internal class SmartMetronomeWidgetThemed : SmartMetronomeWidget(scheme = WidgetScheme.THEMED)
internal class SmartMetronomeWidgetNeutral : SmartMetronomeWidget(scheme = WidgetScheme.NEUTRAL)
internal open class SmartMetronomeWidget(private val scheme: WidgetScheme) : GlanceAppWidget()
Initial provideGlance:
provideGlance(com.MyApp@88b2193: Context, AppWidgetId(appWidgetId=60): GlanceId) for ge0@514841b, scheme = NEUTRAL
provideGlance(com.MyApp@88b2193: Context, AppWidgetId(appWidgetId=61): GlanceId) for ge0@c51f7f5, scheme = THEMED
provideGlance(com.MyApp@88b2193: Context, AppWidgetId(appWidgetId=62): GlanceId) for rf0@859babf, scheme = NEUTRAL
provideGlance(com.MyApp@88b2193: Context, AppWidgetId(appWidgetId=63): GlanceId) for rf0@e7ee3e, scheme = THEMED
After swiping the app away, all the widgets get reset to themed. Upon opening the app again, I see this:
provideGlance(com.MyApp@d87e432: Context, AppWidgetId(appWidgetId=61): GlanceId) for ge0@cbc18a7, scheme = THEMED
provideGlance(com.MyApp@d87e432: Context, AppWidgetId(appWidgetId=60): GlanceId) for ge0@cbc18a7, scheme = THEMED
provideGlance(com.MyApp@d87e432: Context, AppWidgetId(appWidgetId=62): GlanceId) for rf0@c01759f, scheme = THEMED
provideGlance(com.MyApp@d87e432: Context, AppWidgetId(appWidgetId=63): GlanceId) for rf0@c01759f, scheme = THEMED
Glance loses track that the widgets had different schemes, and associates both widgets with the same instance.
If I do something that causes the compiled widget class names to change, the widgets never load again and stay spinning until I add a new instance of one of the widget. For example, adding @Keep to the widgets.
After adding @Keep to the widgets, and adding a new instance, then all of the widgets work again, including the existing widgets added before.