Unity android FCM

I’m trying to add Google FCM push notification function to Unity project. I’m surprised that there are no resources about Google FCM for Unity. There are only old Google GCM resources. This is my step-by-step progress below.

  1. Make Android Studio project and register it to a FCM console project
  2. Add google-service.json to ‘/app’ and configure build.gradle (project and module)
  3. Add MyFirebaseInstanceIDService, MyFirebaseMessagingService java classes and onTokenRefresh, sendRegistrationToServer, onMessageReceived, _ sendNotification _ methods according to sample example in FCM document
  4. Add services for the classes to AndroidManifest.xml

After that, I tested the Android Studio project on mobile, and FCM console push notification works well. Then, I started to configure the Android Studio project for Unity.

  1. Change ‘application’ to ‘library’ in build.gradle (module) and add deleteOldJar, exportJar for AndroidPlugin.jar
  2. Add classes.jar of Unity to Android Studio library and module setting
  3. Remove ‘android:icon …’, ‘android:theme …’ in AndroidManifest.xml
  4. Export jar and add AndroidPlugin.jar, AndroidManifest.xml to ‘Plugins/Android’ in Unity

Then, I tested the Unity project on mobile. It is built without exception, but FCM console push notification didn’t work. (I made test log for confirming that the Android Studio libray is well plugined for Unity, the log worked well)

Maybe, there are somethings to add to ‘Plugins/Android’ except AndroidManifest.xml and AndroidPlugin.jar like references below.

http://stackoverflow.com/questions/37497363/google-firebase-analytics-plugin-for-unity
http://joxi.ru/Q2KeQD7C3zdYrj

But, I couldn’t find my answer. Please let me know what I have to do or add.
Sorry for bad english and long explanation. Many thanks :slight_smile:

И я остановился на той же проблеме.
Юниты3Д подключаете и использует классы *.арр.
Но не понятно, на самом деле, что запускает, “приемник” Уведомления?! И запускается ли она, не в как приложении, а как в модуле. Ведь в Андроид Студии мы же переключаем в режим модуля.
Пока ищу в просторах интернета, может где добавить в АндроидМанифест.хмл
какие-то разрешения
И без разницы или *.arr или *.jar. Здесь, что-то другое упустили с вида…

And I has stopped on the same issue.
Unity3D connect and use classes * .arr.
But do not understand, in fact, that starts, “receiver” Notifications ?! And can it is run, not as an application, but as a module. After all, Android Studio, we also switched to the mode of the module.
While looking into the Internet open spaces, which can add to AndroidManifest.hml
any resolution
And without a difference, or * .arr or *.jar. Here is something else to kind of lost …