bbade_
05/11/2023, 11:04 PMbbade_
05/11/2023, 11:05 PMKonstantin Klassen
06/06/2023, 3:40 PM.background(GlanceTheme.colors.background)
.appWidgetBackground()
is not the same I get from google widgets, like gmail, stocks or battery, could that be?bod
06/11/2023, 2:05 PMjava.lang.NoSuchMethodError: No virtual method getContentDescription()Ljava/lang/String; in class Landroidx/glance/EmittableImage; or its super classes (declaration of 'androidx.glance.EmittableImage'
Known issue?bod
06/11/2023, 2:17 PMbod
06/11/2023, 2:24 PMButton
look a bit like chips ? That is, with rounded corners. At the moment my button looks like this:andrew
06/14/2023, 12:25 AMandrew
06/14/2023, 12:25 AMandrew
06/14/2023, 12:26 AMandrew
06/14/2023, 2:01 AMandrew
06/14/2023, 3:59 AMandrew
06/14/2023, 10:42 PMandrew
06/14/2023, 10:44 PMandrew
06/14/2023, 10:45 PMDavide Giuseppe Farella
06/17/2023, 9:18 AMtony-choi
06/30/2023, 7:25 AMRicardo Cardona
07/07/2023, 10:13 PMtony-choi
07/17/2023, 8:13 AMRohan Gupta Kandikonda
07/17/2023, 6:14 PMMarcel Pinto
07/18/2023, 5:27 AMDavide Giuseppe Farella
07/26/2023, 5:27 PMMario Andhika
07/27/2023, 9:20 AMRohan Gupta Kandikonda
07/28/2023, 7:58 PMheec.choi
08/25/2023, 12:58 AMJames O Claire
08/30/2023, 1:53 PMprivate val Context.datastore by dataStore(fileKey, WeatherInfoSerializer)
(replaceing the default FILENAME parameter with fileKey, but as it was not yet initialized, it does not work. I'm a bit lost as to how this should be done, though the comments in WeatherApp allude to it being close. Could someone share some help?
I also asked my question here in Stack Overflow:
https://stackoverflow.com/questions/77008645/how-to-make-unique-datastore-for-each-glance-widgetHamza GATTAL
09/01/2023, 5:59 PMSummers Pittman
09/06/2023, 5:29 PMJames O'Claire
09/13/2023, 2:10 PMPermission Denial: opening provider com.thirdgate.stormtracker.ImageFileProvider from ProcessRecord{2899a4f 1117:com.google.android.apps.nexuslauncher/u0a151} (pid=1117, uid=10151) that is not exported from UID 10185
followed by a second warning:
Error inflating RemoteViews android.widget.RemoteViews$ActionException: java.lang.SecurityException: Permission Denial: opening provider com.thirdgate.stormtracker.ImageFileProvider from ProcessRecord{2899a4f 1117:com.google.android.apps.nexuslauncher/u0a151} (pid=1117, uid=10151) that is not exported from UID 10185
I think the issue it is highlighting is that the original permission was granted to the first . This is done with essentially the same code as the above example:
// Find the current launcher every time to ensure it has read permissions
val intent = Intent(Intent.ACTION_MAIN).apply { addCategory(Intent.CATEGORY_HOME) }
val resolveInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
context.packageManager.resolveActivity(
intent,
PackageManager.ResolveInfoFlags.of(PackageManager.MATCH_DEFAULT_ONLY.toLong()),
)
} else {
@Suppress("DEPRECATION")
context.packageManager.resolveActivity(
intent,
PackageManager.MATCH_DEFAULT_ONLY,
)
}
val launcherName = resolveInfo?.activityInfo?.packageName
if (launcherName != null) {
context.grantUriPermission(
launcherName,
contentUri,
FLAG_GRANT_READ_URI_PERMISSION or FLAG_GRANT_PERSISTABLE_URI_PERMISSION,
)
}
How should I store the images so that the URI permissions persist across reinstalls or restarts? Is there any other way I can test this situation? As I mentioned, the whole widget appears to die, but no error logs are shown for my app in logcat.James O'Claire
09/18/2023, 2:15 AM