Coder Social home page Coder Social logo

Comments (5)

Agasper avatar Agasper commented on July 18, 2024

Please read the F.A.Q. Generate a new unique id for every new notification

from unity-android-notifications.

vandelpal avatar vandelpal commented on July 18, 2024

You probably did't understand me. I don't create here a few notifications. I create one. But instead of it getting crash. For the test run application and exit. After 10 seconds, instead of the notification get crash. If you delete this line LocalNotification.CancelNotification(1); that all is well.

Ie, can not be called:
LocalNotification.CancelNotification(1);
LocalNotification.SendNotification(1, ...)

May be need check for pending intent is already running before cancel?
Intent checkIntent = new Intent(currentActivity, UnityNotificationManager.class);
alarmUp = (PendingIntent.getBroadcast(currentActivity, id, checkIntent, PendingIntent.FLAG_NO_CREATE) != null);

from unity-android-notifications.

Agasper avatar Agasper commented on July 18, 2024

Comment CancelNotification and try again

from unity-android-notifications.

vandelpal avatar vandelpal commented on July 18, 2024

It seems that you don't want understand me, because you don't know how to fix this error. I found a way around this problem. Had to modify the LocalNotification class.
Your plugin there is no way to cancel all notifications. If you store all unique notifications identifiers, and cancel only scheduled notification then cancelAllNotifications method is easy to write and this fatal exception will not occur!

from unity-android-notifications.

Agasper avatar Agasper commented on July 18, 2024

You can write any method what you want, it's open source project

from unity-android-notifications.

Related Issues (20)

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.