Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Firebase Push Notification does not appear at android phone

Discussion in 'Android' started by hunnyduke, Sep 12, 2022.

  1. hunnyduke

    hunnyduke

    Joined:
    Jan 30, 2022
    Posts:
    1
    Hi there,
    I am having push notification problem.

    I am using Unity version 2021.3.8f1 to build android mobile application. I tried to make push notification using Firebase version 9.4.0 plugin but somehow the push notification does not appear in phone after i build apk file and create cloud messaging in the firebase.

    I had follow all the step on creating the push notification in the youtube tutorial :


    I had obtain the Sha-1 fingerprints to be insert in the firebase android section.

    I would like to know the problem why does the push notification does not appear in my phone and there seems no problem on building the apps and others.
    Thank you.
     
  2. Lucas7CL

    Lucas7CL

    Joined:
    Sep 28, 2015
    Posts:
    7
    Same here, documentation is getting "super duper easy" with colors and very very easy to follow steps, but... actually someone in Unity has follow the steps provided in the documentation?
     
  3. unity_48CEDB9C94B428023987

    unity_48CEDB9C94B428023987

    Joined:
    Sep 28, 2021
    Posts:
    6
    I had the same problem, but in my case I had forgotten to add the SHA-1 key in the firebase console. Make sure you add the release SHA-1 (the one that you sign your app). Immediately after adding the key to the console, I received my test push notifications. Hope this helps
     
  4. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    Where do you find the SHA-1 key? I am not making an app bundle, just an apk.
     
  5. breban1

    breban1

    Joined:
    Jun 7, 2016
    Posts:
    194
    EDIT:
    I figured out how to get the SHA-1 key and added it to Firebase console project settings, but it's still not working for me.

    Here's how I got the SHA-1:
    1) Locate the keystore file that you use to sign your app (Location found at Unity Project Settings->Publishing Settings)
    2) Go to command prompt in the JDK "bin" directory (Found in Edit->Preferences->External Tools->JDK)
    Example: cd C:\Program Files\Unity\Hub\2020.3.42f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin
    3) type
    keytool -list -v -alias <your-key-name> -keystore <path-to-production-keystore>

    I got the keytool info from here https://developers.google.com/android/guides/client-auth

    Hope this helps someone else, even though it's still not working for me :(
     
    Last edited: Sep 30, 2023