Hi there
I have had a look around and could not find a solution to my problem. I am trying to get push notifications to work using the "firebase cloud messaging" service.
I am following the Microsoft xamarin guide
https://learn.microsoft.com/en-us/xamarin/android/data-cloud/google-messaging/remote-notifications-with-fcm?tabs=windows#fcm-notifications-overview.
I am unable to get past the first stage.
I have created a firecloud account. I have the Json and have included it in the project with the same name etc.
In order to import the Nuget packages I also had to import a few more that seemed to be missing from the guide for the project to build.
Namely xamarin.google.dagger
I have as far as I can tell everything correct but I get the exception Java.Lang.RuntimeException
Message=Unable to get provider com.google.firebase.provider.FirebaseInitProvider: com.google.firebase.components.MissingDependencyException: Unsatisfied dependency for component Component<[class com.google.firebase.messaging.FirebaseMessaging]>{1, type=0, deps=[Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, injection=direct}, Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=optional, injection=provider}, Dependency{anInterface=class com.google.firebase.iid.FirebaseInstanceId, type=required, injection=direct}, Dependency{anInterface=interface com.google.firebase.events.Subscriber, type=required, injection=direct}, Dependency{anInterface=interface com.google.android.datatransport.TransportFactory, type=optional, injection=direct}, Dependency{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=optional, injection=provider}, Dependency{anInterface=interface com.google.firebase.installations.FirebaseInstallationsApi, type=required, injection=direct}]}: class com.google.firebase.iid.FirebaseInstanceId.
I have done some googling and tried the things I saw such as enabling multi-dex.
My manifest has the permissions:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
I saw that these maybe needed. I have tried to run it on both an emulator and a physical device.
I am using the d8 Dex Compiler and my minimum android version is 8.1 with my target android version being set to Android 9.0.
Any help would be appreciated. The error implies it is looking for some kind of dependency injection for a messaging service?
The Microsoft guide doesn't specify having to set anything up.
It feels like I may be missing a Nuget package or some kind of configuration/manifest issue.
Any pointers would be greatly appreciated.