Giter VIP home page Giter VIP logo

unity-push-notifications's Introduction

Unity-push-notifications

Small system that manages notifications in both iOS and Android.

What does it do?

Uses Pushwoosh https://www.pushwoosh.com/ (for Android) and Unity (for iOS) functionality to make local notifications appear when you want them to.

How do I turn it on?

Unity build-in method OnApplicationPause(bool) governs setting them up and removing if player returns to your game, so nothing is needed to enable them. Just plug, define your notifications, add them to dispatcher, and play:)

How do I define my notifications?

You inherit from Notification class. Just overrride Condition to enable notification, and define your behavior in getter. Set SecondsToNotification to how much seconds should you wait till notification appearing, header to what should be the header of notification (typicaly you app name), and body - message that will go along with it. Condition should return true when notification is set up, false if otherwise.

You can also define custom actions that should be done when notification is executed, you do this by overriding InvokeAction method and doing what you want. You then add InvokeAction to NotificationDispatcher event called NotificationReward. InvokeAction should also check time that enough time has passed for this thing to run this code.

How do I add them to dispatcher?

Add them to Notifications List in NotificationDispatcher. Either during gameplay, or in list declaration section. Either way is okay.

What do other things in dispatcher do?

This is basic structure made for Pushwoosh remote notifications. You can read more here http://docs.pushwoosh.com/docs/unity-plugin on that matter.

Q&A

Why does my notifications don't file from 9PM to 9AM? Not to disturb users in the night.

Where do I get pushwoosh plugin? Here: http://docs.pushwoosh.com/docs/unity-plugin

Where do I insert my credit card? It is free, so put that thing away. Okay?:)

unity-push-notifications's People

Contributors

deergs 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.