Search Unity

Where is Unity Mobile Notifications Package?

Discussion in 'Package Manager' started by BoatBest, Feb 4, 2019.

  1. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    72
    I saw this manual from Unity but I couldn't use it like there is no AndroidNotificationChannel() for me to use and also I try to find the namespace and it said like Unity.Notifications.Android but still couldn't implement that no the code. So would someone please help me about this like what is this manual and how can I use it.
    Many thanks in advance!
    Link is here https://docs.unity3d.com/Packages/com.unity.mobile.notifications@1.0/manual/
     
  2. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    540
  3. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    72
  4. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    72
    I already follow the installation steps for Mobile Notifications Package, but still can't use the namespace Unity.Notifications.Android & Unity.Notifications.iOS like the manual said that after using these namespace we can use its class and method.
    Also there are 6 warning after I downloaded the package. What are these talking about and do I have to fix something?

    /Users/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Runtime/Android/AndroidNotificationCenter.cs(482,20): warning CS0414: The private field `Unity.Notifications.Android.AndroidNotificationCenter.AndroidSDK' is assigned but its value is never used

    /Users/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Editor/UnityNotificationEditorManager.cs(405,25): warning CS0219: The variable `textXxhdpi' is assigned but its value is never used

    /Users/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Editor/UnityNotificationEditorManager.cs(480,17): warning CS0219: The variable `textureFormat' is assigned but its value is never used

    /Users/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Editor/UnityNotificationsEditorManagerEditor.cs(36,22): warning CS0414: The private field `Unity.Notifications.UnityNotificationsEditorManagerEditor.identifierLabelText' is assigned but its value is never used

    /Users/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Editor/UnityNotificationsEditorManagerEditor.cs(37,22): warning CS0414: The private field `Unity.Notifications.UnityNotificationsEditorManagerEditor.typeLabelText' is assigned but its value is never used

    /Users/boat/Library/Unity/cache/packages/packages.unity.com/com.unity.mobile.notifications@1.0.0-preview.8/Runtime/iOS/iOSNotificationCenter.cs(663,60): warning CS0067: The event `Unity.Notifications.iOS.AuthorizationRequest.OnAuthRequest' is never used

    Thank you in advance again sir!!!
     
    Last edited: Feb 4, 2019
  5. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    540
    @BoatBest. Can I ask you to post your question again in the thread I linked above? Thanks!
     
    BoatBest likes this.
  6. BoatBest

    BoatBest

    Joined:
    Jan 4, 2016
    Posts:
    72
    I already posted it, but just for warning question because I got the namespace already. I just have to reopen Unity and IDE. hahaha
     
  7. PsychoDuckArcade

    PsychoDuckArcade

    Joined:
    Jun 17, 2014
    Posts:
    17
    Hey I have the same problem. Any solution? Must be missing not mentioned in the manual or thread, involving linking the installed package or using a particular namespace, I assume.
     
  8. PsychoDuckArcade

    PsychoDuckArcade

    Joined:
    Jun 17, 2014
    Posts:
    17
    For anyone else with this issue, I got it working by adding the namespaces Unity.Notifications.Android and/or Unity.Notifications.iOS.

    Just add

    using Unity.Notifications.Android;
    using Unity.Notifications.iOS;

    to the top of the script.

    It doesn't mention adding the name spaces anywhere in the docs lol.