I know this is very strange, but I really can’t understand how it is possible.
I have an Ionic4 app that uses the Barcodescanner that works pretty well.
Now I have added to the same app FirebaseX to receive Push Notifications.
To customize the icons of the notifications, as suggested by the documentation of the plugin, I have added these lines to the file config.xml of the app:
<platform name="android"> <config-file parent="/manifest/application" target="AndroidManifest.xml"> <meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon" /> </config-file> <resource-file src="resources/android/notifications/drawable-mdpi/notification_icon.png" target="app/src/main/res/drawable-mdpi/notification_icon.png" /> <resource-file src="resources/android/notifications/drawable-hdpi/notification_icon.png" target="app/src/main/res/drawable-hdpi/notification_icon.png" /> <resource-file src="resources/android/notifications/drawable-xhdpi/notification_icon.png" target="app/src/main/res/drawable-xhdpi/notification_icon.png" /> <resource-file src="resources/android/notifications/drawable-xxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxhdpi/notification_icon.png" /> <resource-file src="resources/android/notifications/drawable-xxxhdpi/notification_icon.png" target="app/src/main/res/drawable-xxxhdpi/notification_icon.png" /> </platform>
The problem is that after adding these lines for FirebaseX, when I use the app, the Barcodescanner crashes the app each time it is used.
How do I know that this is the cause?
If I remove these lines from the config.xml file the Barcodescanner doesn’t crash…but only after running again:
ionic cordova platform rm android ionic cordova platform add android
I’ve tried to add again those lines of the xml file and to remove them many times because I can’t believe this, but the result is right this.
I can’t understand the relation between these two plugins.
Thank you very much