FirebasePushNotificationPlugin icon indicating copy to clipboard operation
FirebasePushNotificationPlugin copied to clipboard

android:exported attribute missing in manifest. Unusable on Android 12 (will be rejected by playstore)

Open innomotionmedia opened this issue 3 years ago • 5 comments

Hi,

the attribute android:exported is missing.

This is the manifest after build:

This needs to have android:exported="false" or "true" for it to be acceptable by the playstore.

This is a big issue!

innomotionmedia avatar Feb 08 '22 12:02 innomotionmedia

The only solution rn is to add this line manually to the manifest inside appliaction tags:

innomotionmedia avatar Feb 08 '22 12:02 innomotionmedia

The only solution rn is to add this line manually to the manifest inside appliaction tags:

@innomotionmedia you need to analyze the AndroidManifest.xml file that is created by Xamarin. I've managed to make a workaround to this issue by adding the following lines in the AndroidManifest.xml present in your android project, under the application tag:

<!-- Necessary for Plugin.FirebasePushNotification -->
		<service android:name="crc6494e14b9856016c30.PNFirebaseMessagingService" android:exported="true" tools:node="merge">
			<intent-filter>
				<action android:name="com.google.firebase.MESSAGING_EVENT" />
			</intent-filter>
		</service>

Hope this helps.

R3muSGFX avatar Feb 17 '22 10:02 R3muSGFX

Thanks @R3muSGFX for providing a workaround. It fixed the issue.

vhugogarcia avatar Apr 07 '22 15:04 vhugogarcia

The only solution rn is to add this line manually to the manifest inside appliaction tags:

@innomotionmedia you need to analyze the AndroidManifest.xml file that is created by Xamarin. I've managed to make a workaround to this issue by adding the following lines in the AndroidManifest.xml present in your android project, under the application tag:

<!-- Necessary for Plugin.FirebasePushNotification -->
		<service android:name="crc6494e14b9856016c30.PNFirebaseMessagingService" android:exported="true" tools:node="merge">
			<intent-filter>
				<action android:name="com.google.firebase.MESSAGING_EVENT" />
			</intent-filter>
		</service>

Hope this helps.

Solution works, but only problem is that when Android 12.0 device receives notification - app crashes.

feduke-nukem avatar Apr 19 '22 13:04 feduke-nukem

The only solution rn is to add this line manually to the manifest inside appliaction tags:

@innomotionmedia you need to analyze the AndroidManifest.xml file that is created by Xamarin. I've managed to make a workaround to this issue by adding the following lines in the AndroidManifest.xml present in your android project, under the application tag:

<!-- Necessary for Plugin.FirebasePushNotification -->
		<service android:name="crc6494e14b9856016c30.PNFirebaseMessagingService" android:exported="true" tools:node="merge">
			<intent-filter>
				<action android:name="com.google.firebase.MESSAGING_EVENT" />
			</intent-filter>
		</service>

Hope this helps.

Solution works, but only problem is that when Android 12.0 device receives notification - app crashes.

@coccyx-cyst If you look on the issue I've posted (https://github.com/CrossGeeks/FirebasePushNotificationPlugin/issues/409) I've pointed out the exact issues present at the moment and how we treated them.

R3muSGFX avatar Apr 20 '22 15:04 R3muSGFX