Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Push Notifications not appearing in Mobile devices.

Discussion in 'Player Engagement' started by Ohilo, May 20, 2023.

  1. Ohilo

    Ohilo

    Joined:
    Jul 30, 2021
    Posts:
    32
    Hi, I followed the steps in the Setup Guide.
    The setup guide does not exactly mention whether we should have the firebase sdk or not.
    To generate the app id firebase asked to copy paste a config file in the assets folder and also install firebase sdk in the unity project.
    I figured since i already had the unity sdk it means that i do not need to install firebase sdk.
    I did all the steps as listed in the setup guide i.e added the details such as firebase web api key and also uploaded the private key from firebase into unity.
    I have 2 questions
    1.) Do I need the firebase sdk as well?
    2.) it works in the test notification method of copy pasting the token from the logs, as given in the setup guide , but does not work when i try it directly.On the dashboard it shows the status of the notification as complete. But I do not recieve it on my device.What is happening here?
     
  2. VladS_Unity

    VladS_Unity

    Unity Technologies

    Joined:
    Nov 18, 2022
    Posts:
    6
    Hello Ohilo. Thanks for reaching out!

    Firstly, allow me to clarify that you do not need to install the Firebase SDK. While you may install it should you need any of it's features, the Push Notifications SDK doesn't require it to function: it already has everything it needs to operate.

    You do need to add an App to the Firebase project in order to use the Push Notifications SDK. However, to do so you do not need to follow anything past the 1st step of the creation wizard (Register App), as after this your app is already created within Firebase. The rest of the setup guide is for integrating the Firebase SDK within your Unity project, which you do not need to do. You may continue to press "Next" until the end of the creation flow, then continue following the setup guide to add the appropriate details to the Push Notifications SDK.

    In regards to the dashboard showing the status of the notification as complete but receiving no notification, that was a bug that we've just resolved. The test tool should now accurately tell you whether a notification was indeed successfully sent or not!

    EDIT: We've additionally also released a new Troubleshooting guide here. If you encounter any further issues while integrating the Push Notifications SDK, this guide might help you solve them!

    I hope this answers your questions. Please let me know if this has helped you or if you have any follow-up questions.
     
    Last edited: May 22, 2023
  3. Ohilo

    Ohilo

    Joined:
    Jul 30, 2021
    Posts:
    32
    Hello VladS_Unity.
    I am sorry, but it seems Firebase sdk is required for proper functioning of Push notification.
    I did everything, as it was in the setup guide in a blank project.
    The only difference is i created a testing ennvironment and tested there.
    When I enter the token copying it from android logcat and entering it in the Test Device widget in push notification creation steps, it works.
    But scheduling the notification does not.
    I was using UTC as the timezone. 1 hr 1min later schedule as it asks for atleast an hour in the future.
    Again in the push notification dashboard it says complete but i do not recieve it in the mobile device.
    In my analytics in the testing environment, recieved an event notificationservices.
    Also got a outofgamesend event as well when tried with the Test Device way by manually entering the token.
    I am lost here as to what could be the potential issue here.
    When installing Firebase SDK in my previous project it worked.
     
  4. VladS_Unity

    VladS_Unity

    Unity Technologies

    Joined:
    Nov 18, 2022
    Posts:
    6
    Hello Ohilo.

    Sorry to hear you're experiencing issues with using the Push Notifications SDK.

    We'd like to investigate further into the issue you're experiencing. I'll be messaging you privately to ask for more information.

    Thank you for your help.
     
  5. FDUnity-10

    FDUnity-10

    Joined:
    Oct 10, 2023
    Posts:
    2
    I am having the same issue
    Any update on this?
    Unity version 2022.3.21f
    Push Notification Package version 3.0.0-pre.1