Full-screen notifications downgraded on Wear OS (Pixel & Samsung) when minifyEnabled=true, despite ProGuard keep rules

1 week ago 11
ARTICLE AD BOX

I’m debugging - with ChatGPT since I am not very expert - a Wear OS app with a Flutter plugin that triggers a full-screen feedback screen via a Foreground Service and a FullScreenActivity.

Everything works fine when I disable code shrinking, but when I enable minifyEnabled true (R8), the full-screen UI no longer appears:

On Samsung Watch (One UI Watch 5) → works with minify off, downgraded to normal notification when minify on.

On Pixel Watch (Wear OS 5 / Android 14) → always downgraded regardless of minify.

I already added these rules (simplified):

-keep class mypackage.full_screen_plugin.** { *; } -keep public class * extends android.app.Activity -keep public class * extends android.app.Service -keep public class * extends android.content.BroadcastReceiver -keep class androidx.core.app.NotificationCompat$Builder { *; } -keep class androidx.core.app.NotificationCompat$WearableExtender { *; } -keepclassmembers class * implements android.os.Parcelable { public static final android.os.Parcelable$Creator *; }

I also confirmed in mapping.txt that FullScreenActivity, ForegroundService, and the receiver are not renamed. Yet, full-screen notifications are still downgraded when minified.

removed.txt shows that R8 stripped these:

full_screen_plugin.R$drawable full_screen_plugin.R$id full_screen_plugin.R$layout

Adding explicit keeps for them didn’t fix it. No Resources$NotFoundException or ActivityNotFoundException appears in logcat; the system just shows a regular heads-up notification instead of full-screen.

Has anyone successfully shipped full-screen notifications on Wear OS 4+ with minifyEnabled=true?

Environment:

Wear OS 4 (Samsung Watch 4, Pixel Watch 1)

Android 14

Flutter plugin module with Foreground Service shim

Gradle 8.7, AGP 8.6.1

ProGuard/R8 default config + custom rules above

Any insight on what R8 might still strip or how Wear OS determines full-screen downgrade would be appreciated.

Read Entire Article