Closed nico6ka closed 2 years ago
@abramov7 The 3.0.0-beta1 SDK is now live with these changes. Check out the OneSignal Xamarin SDK Version 4 - Beta now available!#262 thread for more details.
Even with 4.0.0-beta5, this still doesn't work which means that targeting Android 12 is impossible.
ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl2119947732.tmp/base.apk (at Binary XML file line #65): com.onesignal.GcmBroadcastReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
EDIT: Fixed by replacing GcmBroadcastReceiver
with FCMBroadcastReceiver
in AndroidManifest.xml. There's been no mention of this anywhere. Perhaps add that in the migration step?
@dealdiane Thanks for pointing that out, GcmBroadcastReceiver
can be completely removed actually. No need to have FCMBroadcastReceiver
in your AndroidManifest.xml
, the SDK now automatically handles this at build time.
We will update the migration guide to add this removal step.
We added Step 6 - Android - AndroidManifest.xml Changes to account for this.
The OneSignal-Xamarin-SDK 4.0.0 release is now live and out of beta!
@jkasten2 Thanks. I can't see that anything about updating AndroidManifest.xml that you just just added though.
@dealdiane Thanks for pointing that out, not sure what happened but added back the section again.
Description:
I'm trying to test targeting Android 12. The build is failing because of not declaring the android:exported in the manifest. When I checked the merged manifest file, I found that OneSignal doesn't declare android:exported.
https://developer.android.com/about/versions/12/behavior-changes-12#exported
This is the error:
Issue is fixed in OneSignal Android SDK 4.4.1. #1349 but if I am not wrong, Xamarin SDK use version 3.10.6