Giter Site home page Giter Site logo

woodemi / quick_notify Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 16.0 216 KB

A cross-platform (Android/iOS/Web/Windows/macOS/Linux) notification plugin for Flutter

License: BSD 3-Clause "New" or "Revised" License

Kotlin 4.63% Ruby 6.00% Swift 7.35% Objective-C 0.98% Dart 7.53% CMake 24.66% C++ 43.08% C 3.61% HTML 2.15%

quick_notify's People

Contributors

sunbreak avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

quick_notify's Issues

Microsoft.Windows.CppWinRT.props not found

I'm getting error:
~\Documents\flutter_apps\alert_proj\build\windows\packages\Microsoft.Windows.CppWinRT\build\native\Microsoft.Windows.CppWinRT.props" was not found

After some research, I found that this is apparently something required by nuget, but that you can't just nuget install {...}, and have to use the special developer powershell for VS2019 Community. Trying the command there says that I need to open a project.

Trying to open to the {project_root}\build\windows folder in VS2019 Community, and trying to run the Install-Package command again, gets me the following Install-Package : Project 'Default' is not found..

Please advise.

Flutter 2.0 support

Null safety is part of Flutter 2.0. I'm not familiar with this library but it seams that this could be the hardest part in upgrading to 2.0. I have an app that would benefit from this library but without 2.0 support there is no way for me to use it.

Error building on windows.

Error building on windows.

C:\...\Formacion\quick_notify\example>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, 2.6.0-11.0.pre, on Microsoft Windows [Version 10.0.19042.1288], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.4)
[√] Android Studio (version 4.2)
[√] VS Code (version 1.61.1)
[√] Connected device (5 available)

• No issues found!
C:\...\Formacion\quick_notify\example>flutter run -d window
Multiple devices found:
Windows (desktop)       • windows • windows-x64     • Microsoft Windows [Version 10.0.19042.1288]
Windows (UWP) (desktop) • winuwp  • windows-uwp-x64 •
[1]: Windows (windows)
[2]: Windows (UWP) (winuwp)

Please choose one (To quit, press "q/Q"): 1

Launching lib\main.dart on Windows in debug mode...
flutter_window.obj : error LNK2019: símbolo externo "public: void __cdecl RunLoop::RegisterFlutterInstance(class flutter::FlutterEngine *)" (?RegisterFlutterInstance@RunLoo
p@@QEAAXPEAVFlutterEngine@flutter@@@Z) sin resolver al que se hace referencia en la función "protected: virtual bool __cdecl FlutterWindow::OnCreate(void)" (?OnCreate@Flutt
erWindow@@MEAA_NXZ) [C:\...\Formacion\quick_notify\example\build\windows\runner\quick_notify_example.vcxproj]
flutter_window.obj : error LNK2019: símbolo externo "public: void __cdecl RunLoop::UnregisterFlutterInstance(class flutter::FlutterEngine *)" (?UnregisterFlutterInstance@Ru
nLoop@@QEAAXPEAVFlutterEngine@flutter@@@Z) sin resolver al que se hace referencia en la función "protected: virtual void __cdecl FlutterWindow::OnDestroy(void)" (?OnDestroy
@FlutterWindow@@MEAAXXZ) [C:\...\Formacion\quick_notify\example\build\windows\runner\quick_notify_example.vcxproj]
main.obj : error LNK2019: símbolo externo "public: __cdecl RunLoop::RunLoop(void)" (??0RunLoop@@QEAA@XZ) sin resolver al que se hace referencia en la función wWinMain [C:\...\Formacion\quick_notify\example\build\windows\runner\quick_notify_example.vcxproj]
main.obj : error LNK2019: símbolo externo "public: __cdecl RunLoop::~RunLoop(void)" (??1RunLoop@@QEAA@XZ) sin resolver al que se hace referencia en la función wWinMain [C:\...\Formacion\quick_notify\example\build\windows\runner\quick_notify_example.vcxproj]
main.obj : error LNK2019: símbolo externo "public: void __cdecl RunLoop::Run(void)" (?Run@RunLoop@@QEAAXXZ) sin resolver al que se hace referencia en la función wWinMain [C
:\...\Formacion\quick_notify\example\build\windows\runner\quick_notify_example.vcxproj]
C:\...\Formacion\quick_notify\example\build\windows\runner\Debug\quick_notify_example.exe : fatal error LNK1120: 5 externos sin resolver [C:\...\Formacion\quick_n
otify\example\build\windows\runner\quick_notify_example.vcxproj]
Building Windows application...
Exception: Build process failed.

On android it works

C:\...\Formacion\quick_notify\example>flutter run -d emulator-5554
Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...                              3.7s
√  Built build\app\outputs\flutter-apk\app-debug.apk.
W/FlutterActivityAndFragmentDelegate( 7354): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration step
s.
Syncing files to device AOSP on IA Emulator...                      79ms

Flutter run key commands.
r Hot reload.
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

Running with unsound null safety
For more information see https://dart.dev/null-safety/unsound-null-safety

An Observatory debugger and profiler on AOSP on IA Emulator is available at: http://127.0.0.1:59277/Q50ArEdhnBc=/
D/eglCodecCommon( 7354): setVertexArrayObject: set vao to 0 (0) 1 0
The Flutter DevTools debugger and profiler on AOSP on IA Emulator is available at: http://127.0.0.1:9107?uri=http://127.0.0.1:59277/Q50ArEdhnBc=/

2021-10-19_10h27_21

Support Changing MethodChannel Name?

Testing the example code on Linux, I am seeing a notification with a title of "quick_notify".

I've got the app window down where the notifications are shown to take screenshot of both the running app and the notification.
image

I am wondering if it would be possible to change the notification channel name. I am assuming this is the name that reported to the platform specific notification system for showing what triggered the notification.

Looking at the code for quick_notify.dart, I see that there is a MethodChannel, which is set to "quick_notify".

So I tested a copy of the class with quick_notify changed to "My Project", and changed the name to MyQuickNotify

Using MyQuickNotify in place of QuickNotify, like so:

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:quick_notify/quick_notify.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            ElevatedButton(
              child: Text('notify'),
              onPressed: () {
                MyQuickNotify.notify(content: 'My Content');
              },
            ),
          ],
        ),
      ),
    );
  }
}

class MyQuickNotify {
  static const MethodChannel _channel = const MethodChannel('My Project');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static void notify({
    String? content,
  }) {
    _channel.invokeMethod('notify', {
      'content': content,
    });
  }
}

Doing this yields a thrown exception from the Flutter services module.

throw MissingPluginException('No implementation found for method $method on channel $name');

Is it possible to add support for changing the notification channel name, such that the notification will show something that will help the user link the notification to the application by name?

Support `Web`

Please try web.

it works for me.

worth integrating into yours

Windows Cannot Build

C:\Users\diqdq\SourceCode\quick_notify\example\build\windows\plugins\quick_notify\quick_notify_plugin.vcxproj(254,3): error MSB4019: The imported project "C:\Users\diqdq\SourceCode\quick_notify\example\build\windows\packages\Microsoft.Windows.CppWinRT\build\native\Microsoft.Windows.CppWinRT.props" was not found. Confirm that the expression in the Import declaration "C:\Users\diqdq\SourceCode\quick_notify\example\build\windows\packages\Microsoft.Windows.CppWinRT\build\native\Microsoft.Windows.CppWinRT.props" is correct, and that the file exists on disk.
Exception: Build process failed.

Error Invalid notification (no valid small icon)

Hello,
when i try to send an Quick notify i got this error:
"java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=quick_notify shortcut=null contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 vis=PRIVATE)"
minSDK:21
targetSDK:30

Any help for this?

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.