I tried to follow the tutorial: Push notifications to Xamarin.Android (the iOS part works already)
But I get the following error at build time:
The "ProcessGoogleServicesJson" task was not given a value for the required parameter "ResStringsPath". ServiceToolStandard.Android
What I have so far:
- I've created a firebase project
- FirebaseConsole:
- downloaded the google-services.json file
- copied the legacy server key
- Azure:
- created notification hub
- inserted the legacy server key
- Xamarin Forms App (Android):
- AndroidManifest package name == package name firebase project
- I installed the nuget packages: Xamarin.GooglePlayServices.Base, Xamarin.Firebase.Messaging and Xamarin.Azure.NotificationHubs.Android
- added the google-services.json file to the project and selected the Build Action to GoogleServiceJson
- added the receiver part to the AndroidManifest*
- Then created the classes Constants, MyFirebaseIIDService, MyFirebaseMessagingService and edited the MainActivity
after that the tutorial says "build your project / run your app..." and I get the error.
*here I'm not quite sure what to fill in at ${applicationId}:
<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>
Thanks for your help!