Git Product home page Git Product logo

localnotifications's Introduction

Stencyl Local Notification Extension (Openfl)

For Stencyl 3.4 and above

Stencyl extension for "Local Notification" on iOS and Android. This extension allows you to easily integrate Local Notification on your Stencyl game / application. (http://www.stencyl.com)

Important!!

This Extension Required the Toolset Extension Manager https://byrobingames.github.io

notificationtoolset

Main Features

  • works on IOS and android
  • retpeat notification
  • On Android badge number will only work on Samsung , HTC, Sony, Apex and Solid.

How to Install

To install this Engine Extension, go to the toolset (byRobin Extension Mananger) in the Extension menu of your game inside Stencyl.
toolsetextensionlocation
Select the Extension from the menu and click on "Download"

If you not have byRobin Extension Mananger installed, install this first.
Go to: https://byrobingames.github.io

Documentation and Block Examples

Create your notifications in the Toolset manager.
localnotificationcreate
NotifId: Give your notification an id. (Must be unique number between 0 and 63)
Title: Your notification Title
Message: Your notification Message
Trigger after(in seconds): Time when the system should trigger the notification after the Game is open for the first time.
Repeat Every: The interval at which to reschedule the notification.
Value can be set to no repeat, Minute, Hour, Day, Week or Year


Schedule Local notifications
localnotificationschedule


Cancel notifications with NotifID
localnotificationcancelschedulenr


Cancel all notifications
localnotificationcancelscheduleall


Set icon badge number to (deprecated in Android Version 8.0 > Will be set automatically when Notification is received)
localnotificationsetbadge


Increase icon badge number by (deprecated in Android Version 8.0 > Will be set automatically when Notification is received)
localnotificationincreasebadge


Decrease icon badge number by (deprecated in Android Version 8.0 > Will be set automatically when Notification is received)
localnotificationsetbadge

Version History

  • 2.0 release 2015-07-23
  • 2.1 2015-07-24 : BUG FIX On Android when game is force to closed by player, repeat notification does not work. Works only on background. and it works now on < iOS 8 (thanks mdotedot).
  • 2.2 2015-07-26 : On Android when game is created first time Badge number wil set to 0. - Add icon on blocks.
  • 2.3 2015-07-31 : Now download via GitHub
  • 2.4 2015-08-05 : Comments the assets path in include.xml, assets folder is not needed.
  • 2.5 2015-10-09 : Android Updated android-support-v4.jar to get it work with Stencyl build b9186 and higher
  • 2.5.1(2017-05-16) Tested for Stencyl 3.5, Required byRobin Toolset Extension Manager
  • 2.5.2(2017-05-18): FIX: iOS when selelect no repeat, notification not showing. FIX: single/double quotes does not accepted.
  • 2.5.3(2018-12-30): Fix Android JNI import; Fix when set Android TargetVersion 26.; Set/Increase/Decrease icon badge number is deprecated in Android Version 8 >

Submitting a Pull Request

This software is opensource.
If you want to contribute you can make a pull request

Repository: https://github.com/byrobingames/localnotifications

Need help with a pull request?
https://help.github.com/articles/creating-a-pull-request/

ANY ISSUES?

Add the issue on GitHub
Repository: https://github.com/byrobingames/localnotifications/issues

Need help with creating a issue?
https://help.github.com/articles/creating-an-issue/

Donate

paypal

License

Author: Robin Schaafsma

The MIT License (MIT)

Copyright (c) 2014 byRobinGames http://www.byrobin.nl

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

localnotifications's People

Contributors

byrobingames avatar

Stargazers

 avatar  avatar Joey avatar Ben Morris avatar Roman Murashov avatar Kim Ho avatar

Watchers

Kim Ho avatar Joey avatar  avatar

localnotifications's Issues

Notifications only work when game is active.

Hello, I've only tested this on android(haven't tested iOS yet).

It seems the notifications only work when the game is active or minimized and doesn't show any notifications when the game is closed.

SharedPreferences

Hey @byrobingames, I'm currently updating the extension so it'd work with the newer SDK and some more options. I was wondering if you had a specific reason to use SharedPreferences instead of Intent?

It seems as if SharedPreferences forces currently multiple notifications to the same content as it's the same file that gets overwritten and called by each notification. The BroadcastReceiver ( NCReceiver ) is getting an Intent here : public void onReceive(Context arg0, Intent arg1) - any reason to not transfer the data in there?

MODE_WORLD_READABLE removed from SDK > 24-25

FYI : MODE_WORLD_READABLE stopped working with the latest SDKs, and Google recommends that SDK in case your app wants to be featured. I tested on Google Pixel ( Android N & O ) and it crashes with Security Exception

Worth checking if MODE_PRIVATE would still work with the solution ( e.g. the different notifications have access to it ) or changing the approach ( #MODE_WORLD_READABLE )

https://stackoverflow.com/questions/39121052/java-lang-securityexception-mode-world-readable-no-longer-supported

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.