Giter VIP home page Giter VIP logo

unity-android-notifications's Introduction

Unity3D Android notification plugin

License: MIT Features:

  • Set delayed notification
  • Set delayed repeatable notification
  • Supports custom icon and large icon
  • Fully supports Unity 4.ั… - 5.ั…
  • Fully supports Android 4.1 - 6.0

FAQ

How to get exact notification in Android M ?

It's not recommended by Google since notifications are batching when phone in IDLE_MAINTENANCE state. Now you'll receive notification with additional delay. You can use NotificationExecuteMode.ExactAndAllowWhileIdle mode to force system show your notification with maximum priority. [Read more] (https://developer.android.com/intl/ru/reference/android/app/AlarmManager.html#setExact(int, long, android.app.PendingIntent))

How to set up big icon ?

Just put it into drawable directories *\UnityProject\Assets\Plugins\Android\res* with name notify_icon_big.png. And in the SendNotification method set bigIcon to "notify_icon_big"

How to get rid of obsolete warnings like "OBSOLETE - Providing Android resources in Assets/Plugins/Android/res is deprecated, please move your resources to an Android Library. See "Building Plugins for Android" section of the Manual." ?

You can avoid this by recompiling plugin with icons inside.

I got application crash

Check you don't call CancelNotification and SetNotification in one frame, and you put notify_icon_small into the res directory. Be sure you generate unique id for every new notification.

Notification doesn't launch the app

Set LocalNotification.mainActivityClassName to the your main activity class (from manifest)

Screenshot

Screenshot

unity-android-notifications's People

Contributors

agasper avatar suvitruf avatar

Stargazers

IBaa N. Yimcharoen avatar

Watchers

James Cloos avatar IBaa N. Yimcharoen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.