Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Android Notification Plugin

Discussion in 'Assets and Asset Store' started by Takohi, Nov 14, 2015.

  1. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    We are glad to present you our Android plug-in that enhances control over Android notification system.

    Easily trigger some notifications from your game!
    Working on all available Unity versions, it also does not require Unity PRO version.

    With this plugin, you can display one or several notifications at the same time with a lot of customisations:
    • Small and large icons of your choice from a Texture2D or colors array;
    • Title and content texts;
    • Vibration pattern;
    • Light/LED color and the blink timing;
    • Using the default notification sound or not;
    • Making the notification being removed when the user clicks on it or setting the notification as sticky (can't be removed by the user);
    • Other options...

    When the user clicks on the notification, it will automatically bring him back to your game. You can also update and clear the notifications from your source code.

    You can check how easy it is to use this plugin by checking the documentation and all available functions here:
    http://www.takohi.com/data/unity/assets/android_notification/documentation/

    You can also download and run a demo on your Android device by downloading this APK:
    http://www.takohi.com/data/unity/assets/android_notification/unity-android-notification-plugin-demo.apk
    The source code of this demo is included in the package.

    The price: 2$.
    The asset is available on the asset store here.

    If you have any suggestion or any question, please feel free to ask!

    Also, check our other assets:
     
    Last edited: Nov 14, 2015
  2. akbay

    akbay

    Joined:
    Mar 23, 2015
    Posts:
    3
    Hi,

    I want to create scheduled different notifications. For example, 10 notification with one hour interval. But, I only get one of them at 10 hours later and title and content is belongs to first notification. How can I solve this?

    for (int i = 0; i < 10; i++)
    {
    Notification notification = new Notification("Title " + i.ToString(), "Content " + i.ToString());
    .
    .
    .
    System.DateTime notificationTime = System.DateTime.Now.AddHours(i+1);
    NotificationManager.ShowNotification(i, notification, notificationTime);
    }

    // Title 0 - Content 0

    Please I need to solve this as soon as possible.
     
  3. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    It should work. Is there any code missing?
    Can you also try this following way too?

    Code (CSharp):
    1. {
    2.     Notification notification = new Notification("Title " + i.ToString(), "Content " + i.ToString());
    3.     NotificationManager.ShowNotification(i, notification, i * 1000 * 60 * 60); // 1000 * 60 * 60 number of ms in hour.
    4. }
    See documentation here:
    http://www.takohi.com/data/unity/as...anager.html#ac25032bebccbf55164ba4453e08ff804
     
  4. akbay

    akbay

    Joined:
    Mar 23, 2015
    Posts:
    3
    You can try same thing with demo scene ("notification_scene").

    1) hit "Show Notification with 10s delay"
    2) wait for notification
    3) change title
    4) hit "Show Notification with 10s delay"

    shows same notification every time.

    I tried on android 4.3(s3) and 5.1.1(s6).

    ps I have tried your suggestion. It does't work ether.
     
  5. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    Did you change the Notification ID each time?
     
  6. akbay

    akbay

    Joined:
    Mar 23, 2015
    Posts:
    3
    Yep, I did.
     
  7. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    Ok, thank you. I will take a look and keep you posted.
     
    akbay likes this.
  8. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    I could confirm the problem. It only occurs with notification with delay.
    I'm now trying to find why it happens and fix it as soon as possible. When it's ready, I will send to you the updated file.

    Please be patient, I hope it will be done before this week-end.
     
    akbay likes this.
  9. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
    Hello akbay, I found the problem and made a fix. I will contact you by MP with the update. Sorry for any inconvenience.
     
  10. parker87tinh

    parker87tinh

    Joined:
    Jun 5, 2015
    Posts:
    8
    Hi Takohi.
    Can you post the solution for Notification with delay? i am having the same proplem with notification delay.
    Thanks.
     
  11. Takohi

    Takohi

    Joined:
    May 14, 2014
    Posts:
    58
  12. kathode

    kathode

    Joined:
    Jan 15, 2013
    Posts:
    63
    Hi there,
    Hoping that this plug-in is still supported here. I am having a similar issue with delayed notifications as reported above. In my case, immediate notifications show up and work fine, but delayed notifications never arrive. They do work in the sample APK. But in my app, only showing notifications with no delay parameters works. I even copied the code from Notify.cs and applied it to two buttons in my game.

    I just bought the asset today so I assume I'm on 1.2. Any idea what might cause delay to not work?

    Thank you!

    Edit: Clarified problem.
     
    Last edited: Nov 12, 2016
  13. solid_

    solid_

    Joined:
    Jul 10, 2015
    Posts:
    12
    Hi. Scheduled notification appears after device restart? Thank you!
     
  14. ericmg123

    ericmg123

    Joined:
    Aug 18, 2016
    Posts:
    6
    Hello,
    I've used this to create delayed notifications that work fine when the app is closed or pause.
    However, I am looking to cancel all scheduled notifications if the user presses a button.
    NotificationManager.CancelAll();
    Does not seem to work.

    Just to be clear, the flow is like so:
    1) User adds a bunch of names to a raffle.
    2) User pauses or closes app.
    3) Notifications are scheduled to fire 3, 6, 9, 12 minutes from the time the user closes the app.
    4) User wants to open app after the second notification and cancel the remaining scheduled notifications.

    Any idea how I can accomplish this?

    Many thanks,
    Eric G.