I was using Plugin.FirebasePushNotification in my app, and then I removed it to switch to OnseSignal.
I went thru all the setup, and now the app won't build because of a bunch of errors in AndroidManifest.xml.
Errors like:
- error AMM0000: Package name 'com.google.android.gms.cloudmessaging' used in: AndroidManifest.xml, AndroidManifest.xml.
- error AMM0000: Package name 'com.google.android.gms.common' used in: AndroidManifest.xml, AndroidManifest.xml.
- error AMM0000: Package name 'com.google.android.gms.tasks' used in: AndroidManifest.xml, AndroidManifest.xml.
- error AMM0000: Package name 'com.google.android.gms.maps' used in: AndroidManifest.xml, AndroidManifest.xml.
- error AMM0000: Package name 'com.google.android.gms.stats' used in: AndroidManifest.xml, AndroidManifest.xml.
and so on......
Here's my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.15" android:versionCode="225" package="ca.levitica.livedispatch.prod" android:installLocation="auto">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature android:name="android.hardware.location" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.location.network" android:required="false" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!--OneSignal push - START -->
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<!--OneSignal push - END -->
<application android:label="Live Dispatch" android:icon="@mipmap/ic_launcher" android:largeHeap="true" android:usesCleartextTraffic="true" android:networkSecurityConfig="@xml/network_security_config">
<uses-library android:name="org.apache.http.legacy" android:required="false" />
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<my key>" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
<!--Firebase push - START -->
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<!--Firebase push - END -->
<!--OneSignal push - START -->
<receiver android:name="com.onesignal.GcmBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<!--OneSignal push - END -->
<receiver android:name=".BootReceiver" android:enabled="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
<!-- Set default notification icon and color. -->
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/logo" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/primary" />
<!--Needed for Android 9.0-->
<uses-library android:name="org.apache.http.legacy" android:required="false" />
</application>
</manifest>
I don't know what these errors mean and how to fix them now...Thanks