ProGuard causing exception for Mobile Notifications

Hi all, I’m working on implementing Unity Mobile Notifications and I’ve been experimenting with this provided sample on GitHub - Unity-Technologies/NotificationsSamples: Sample project for Unity Notifications. However, I’m needing some help because when I turn on ProGuard it causes an object reference exception at
PendingNotifications.Add(result); in the CreateNotification() method of the GameNotificationsManager class.

When ProGuard is off the code works. My understanding is that the solution is to setup the proguard-user.txt file to exclude the class from obfuscation. I’m not sure how to correctly identify what I need to exclude from ProGuard. Any advice on how the proguard-user.txt should be configured?

I’m new to ProGuard and so far I’ve tried but this doesn’t seem to work
-keep class com.unity.notificationsamples.Android.** {*;}

Solved. The ProGuard rule needs to be -keep class com.unity.androidnotifications.** { *;}

1 Like

thankssss ,save me

https://github.com/Unity-Technologies/com.unity.mobile.notifications/issues/306