orz
11/09/2023, 3:40 PMactionStartActivity
with an Intent
broken on Android 14? I’ve got the following set up:
...
val intent = Intent(
Intent.Action_VIEW,
widgetDeepLinkUrl.toUri(),
).apply {
putExtra("fromWidget", true)
}
...
modifier = GlanceModifier
.actionStartActivity(
intent = intent
)
...
The above works fine to deep link into the app in versions < 14. As a side note, I can get this to work on Android 14, if I use a custom ActionCallback
where I call context.startActivity(intent)
manually instead of just passing an Intent
.bbade_
11/09/2023, 5:08 PMbbade_
11/09/2023, 5:11 PMam start
?orz
11/09/2023, 5:22 PMAre there any messages in logcat that could help diagnose?Ah, yes—we have this:
Unrecognized Action: androidx.glance.appwidget.action.StartActivityIntentAction@646b689
java.lang.IllegalArgumentException: com.myapp.myapp.hop.debug: Targeting U+ (version 34 and above) disallows creating or retrieving a PendingIntent with FLAG_MUTABLE, an implicit Intent within and without FLAG_NO_CREATE and FLAG_ALLOW_UNSAFE_IMPLICIT_INTENT for security reasons. To retrieve an already existing PendingIntent, use FLAG_NO_CREATE, however, to create a new PendingIntent with an implicit Intent use FLAG_IMMUTABLE.
bbade_
11/09/2023, 5:28 PMbbade_
11/09/2023, 5:43 PMLaurynas Mykolaitis
01/12/2024, 11:53 AM