Giter Site home page Giter Site logo

scheduled_notifications's Introduction

scheduled_notifications

A flutter plugin for scheduling notifications on Android.

Usage

To use this plugin, add scheduled_notifications as a dependency in your pubspec.yaml file. Note you have to specify minSdkVersion on 23 in your AndroidManifest.xml to use this plugin.

Example

import 'package:scheduled_notifications/scheduled_notifications.dart';

void main() {
  runApp(new Scaffold(
    body: new Center(
      child: new RaisedButton(
        onPressed: _scheduleNotification,
        child: new Text('Schedule notification in 5 seconds'),
      ),
    ),
  ));
}

_scheduleNotification() async {
      int notificationId = await ScheduledNotifications.scheduleNotification(
          new DateTime.now().add(new Duration(seconds: 5)).millisecondsSinceEpoch,
          "Ticker text",
          "Content title",
          "Content");
}

scheduled_notifications's People

Contributors

tobiaswk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

scheduled_notifications's Issues

Dart 2 Support

E/flutter (13764): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (13764): type '_Future' is not a subtype of type 'Future<Null>' where
E/flutter (13764):   _Future is from dart:async
E/flutter (13764):   Future is from dart:async
E/flutter (13764):   Null is from dart:core
E/flutter (13764): 
E/flutter (13764): #0      ScheduleNotifications.schedule (package:schedule_notifications/schedule_notifications.dart:13:21)

Unregister notification!

D/dk.kjeldsen.scheduled_notifications.ScheduleNotificationsManager( 4938): Register notification!
D/dk.kjeldsen.scheduled_notifications.ScheduleNotificationsManager( 4938): Saved scheduled notification!
I/flutter ( 4938): 1783802548
D/dk.kjeldsen.scheduled_notifications.ScheduleNotificationsService( 4938): Service start
D/dk.kjeldsen.scheduled_notifications.ScheduleNotificationsManager( 4938): Unregister notification!

what i can do?

iOS Support

Hey there,

awesome work. Is there any support for iOS planned? I'd love to get my hands dirty, but I never really used iOS and I don't have a Mac to test it.

Best regards

FileNotFound Warning

W/System.err(28295): java.io.FileNotFoundException: /data/user/0/com.yourcompany.irri/files/scheduledNotifications (No such file or directory) W/System.err(28295): at java.io.FileInputStream.open(Native Method) W/System.err(28295): at java.io.FileInputStream.<init>(FileInputStream.java:146) W/System.err(28295): at android.app.ContextImpl.openFileInput(ContextImpl.java:476) W/System.err(28295): at android.content.ContextWrapper.openFileInput(ContextWrapper.java:186) W/System.err(28295): at dk.kjeldsen.scheduled_notifications.ScheduleNotificationsManager.load(ScheduleNotificationsManager.java:59) W/System.err(28295): at dk.kjeldsen.scheduled_notifications.ScheduleNotificationsManager.instance(ScheduleNotificationsManager.java:91) W/System.err(28295): at dk.kjeldsen.scheduled_notifications.ScheduledNotificationsPlugin.scheduledNotification(ScheduledNotificationsPlugin.java:49) W/System.err(28295): at dk.kjeldsen.scheduled_notifications.ScheduledNotificationsPlugin.onMethodCall(ScheduledNotificationsPlugin.java:36) W/System.err(28295): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191) W/System.err(28295): at io.flutter.view.FlutterView.handlePlatformMessage(FlutterView.java:643) W/System.err(28295): at android.os.MessageQueue.nativePollOnce(Native Method) W/System.err(28295): at android.os.MessageQueue.next(MessageQueue.java:323) W/System.err(28295): at android.os.Looper.loop(Looper.java:136) W/System.err(28295): at android.app.ActivityThread.main(ActivityThread.java:6126) W/System.err(28295): at java.lang.reflect.Method.invoke(Native Method) W/System.err(28295): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) W/System.err(28295): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

But works perfect.
Is possible to use this to build real notifications?

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.