Skip to content

[Bug]: Push notifications not displayed with R8/minify enabled (Android, SDK 5.6.1, AGP 9) #2582

@StringMeUp

Description

@StringMeUp

What happened?

Hi,

On Android, push notifications are received (I see "NotificationWorkManager enqueueing notification work" in logcat) but never shown when the app is built with minifyEnabled = true (R8). With minify and shrinkResources disabled, everything works and I see "NotificationWorker running doWork", "Fire remoteNotificationReceived", and "Worker result SUCCESS" for NotificationGenerationWorkManager$NotificationGenerationWorker.

OneSignal SDK: 5.6.1 (current); I also tried 5.7.2 – same behaviour with minify ON.
Android Gradle Plugin: 9.0.1
Build: prodRelease with minify + shrinkResources enabled
Device: Pixel 8, Android 16 (API 36)

Is there a known issue or recommended ProGuard/R8 configuration for SDK 5.x (5.6.1 / 5.7.2) with AGP 9 so that notifications are displayed with minify enabled? If you need full ProGuard rules or a logcat snippet, I can provide them.

Thanks.

Steps to reproduce?

1. Install app
2. Request permission
3. Grant permissions
4. Trigger push
5. See push ONLY in logs (push not shown on device)

What did you expect to happen?

I expected to receive push notification.

OneSignal Android SDK version

Release 5.7.2

Android version

15

Specific Android models

Pixel 8 Android 16

Relevant log output

OneSignal  [package]  D  [main] ApplicationService.handleLostFocus: application is now out of focus
OneSignal  [package]  D  [main] NotificationWorkManager enqueueing notification work with notificationId: [redacted] and jsonPayload: {"google.delivered_priority":"high",...,"alert":"...","title":"...",...}
OneSignal  [package]  D  [main] ApplicationService.onActivityStarted(0,APP_CLOSE): [package].MainActivity@...
OneSignal  [package]  D  [main] ApplicationService.handleFocus: application is now in focus

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions