Fix of build for Android 12
vovka-s opened this issue ยท 2 comments
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch @hmscore/cordova-plugin-hms-push@6.3.0-304
for the project I'm working on.
Build fails due to HmsLocalNotificationBootEventReceiver
has no android:exported
attribute
I added it but I'm not sure that the value true
is correct
Please check it
Here is the diff that solved my problem:
diff --git a/node_modules/@hmscore/cordova-plugin-hms-push/plugin.xml b/node_modules/@hmscore/cordova-plugin-hms-push/plugin.xml
index 0c76979..265ed8d 100644
--- a/node_modules/@hmscore/cordova-plugin-hms-push/plugin.xml
+++ b/node_modules/@hmscore/cordova-plugin-hms-push/plugin.xml
@@ -55,7 +55,8 @@
<receiver
android:name="com.huawei.hms.cordova.push.receiver.HmsLocalNotificationActionsReceiver" />
<receiver
- android:name="com.huawei.hms.cordova.push.receiver.HmsLocalNotificationBootEventReceiver">
+ android:name="com.huawei.hms.cordova.push.receiver.HmsLocalNotificationBootEventReceiver"
+ android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
This issue body was partially generated by patch-package.
The Cordova Push plugin does not adapt to Android 12 yet. You are advised to manually add the export configuration as follows:
android:exported="false"
The Cordova Push plugin does not adapt to Android 12 yet. You are advised to manually add the export configuration as follows:
android:exported="false"
Ok, thanks!