-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to instantiate receiver com.onesignal.GcmBroadcastReceiver when using R8 code shrinker (com.onesignal.FCMBroadcastReceiver when using OneSignal 4.0.0) #235
Comments
@Hakim83 Thanks for reporting the issue. We have a release OneSignalSDK.Xamarin-4.0.0 in which this issue no longer seems to exist. Please note that we have changed the package name and namespace for the SDK from Additionally, when searching for the package on nuget.org, you will be required to search for OneSignalSDK.Xamarin to import the package |
Problem still exits. If we use r8 shrinking in Android we are facing this issue. Only way to get away with this crash is adding a custom proguard.cfg file and add following lines to it
|
@dush135 Could you let us know what Android versions and device models you are seeing this issue on? |
Tested devices Samsung s10+ = Android 12 Tested on both MAC and Windows Visual Studio 2022 Xamarin.Forms 5.0.0.2401 |
This is still an issue for me as well. Using Visual Studio 2022 - OneSIgnalXamarin SDK Using R8 and release mode. Tested devices: Xamarin.Forms 5.0.0.2401 |
Original Issue - com.onesignal.GcmBroadcastReceiverFor those seeing this with com.onesignal.FCMBroadcastReceiverFor those seeing this with The next step here would be to see if the issue still happens with a MAUI project. Either way, it could be reported to Microsoft to see if they can address it in a future update. |
OneSignalSDK.DotNet v 5.10 |
Description:
I followed the documentation to make Xamarin.Forms OneSignal notification app targeting Android. In release mode, it works well, I receive push notification message (I tried it using tags), but if I recompile with Android code shrinker set to 'r8' the app crashes when receiving notification. following is the android device monitor log:
AndroidManifest.xml:
Environment
Visual Studio Community 2019 version 16.9.2
Xamarin.Android SDK 11.2.2.1
Com.OneSignal Nuget version 3.10.5
Steps to Reproduce Issue:
The text was updated successfully, but these errors were encountered: