Giter VIP home page Giter VIP logo

unilocalnotification's Introduction

UniLocalNotification

UnityVersion AndroidStudioVersion License


Simple Local Notification Plugins for Unity

Description

UniLocalNotification - It's a plugin for implementing local notification easily. It can hide processing by platform and register local notification with single code. And several convenient methods are also implemented.

Example Demo

Requirement

Unity5 or higher

Support Platform

iOS, Android

Usage

Initialize

Initialize the plugin. Plese call the method at the beginning of your app every time.

UniLocalNotification.Initialize();

Register Local Notification

Register local notification to device. The third argument only use android platform.

// Notify in 10 seconds
int delay = 10;
UniLocalNotification.Register(delay, "message", "title");

Cancel Local Notification

Cancell all local notifications registered

UniLocalNotification.CancelAll();

Check Permission

To check whether the user has allowed the notification

bool isPermitted = UniLocalNotification.IsLocalNotificationPermitted();

Open App Settings

Open application settings (to allow users to register notifications)

UniLocalNotification.OpenAppSetting();

Install

Use unitypackage at the relase page.

Change Notification Icon at Android Status Bar

Android status bar icons should be 32-bit PNGs with an alpha channel for transparency. So, you can change the icon by creating your aar library.

  1. Open AndroidLibraryProject by Android Studio.
  2. Replase notification icon at the "unilocalnotification/src/main/res/drawable/notification_icon.png".

  1. Create AAR

    Go to android project root and type "./gradlew assemble".

  1. Find AAR At "unilocalnotification/build/outputs/aar/".

  1. Replace AAR at the unity project.

Licence

MIT

Author

sanukin39

unilocalnotification's People

Contributors

sanukin39 avatar

Watchers

 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.