Giter VIP home page Giter VIP logo

flutter_beep's Introduction

flutter_beep

A very lite module to play system sounds and beep for flutter apps (no sound files)

Sponsor by

Go Noter app - Group travel and expenses assistant!

import 'package:flutter_beep/flutter_beep.dart';

RaisedButton( child: Text("Beep Success"), onPressed: ()=> FlutterBeep.beep()),
RaisedButton( child: Text("Beep Fail"), onPressed: ()=> FlutterBeep.beep(false)),
RaisedButton( child: Text("Beep Android Custom"), onPressed: ()=> FlutterBeep.playSysSound(AndroidSoundIDs.TONE_CDMA_ABBR_ALERT)),
RaisedButton( child: Text("Beep somthing"), onPressed: ()=> FlutterBeep.playSysSound(41)),
RaisedButton( child: Text("Beep iOS Custom"), onPressed: ()=> FlutterBeep.playSysSound(iOSSoundIDs.AudioToneBusy)),

LICENSE: FREE

flutter_beep's People

Contributors

fabioranieri avatar juliansteenbakker avatar trietho avatar triethowvn avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

flutter_beep's Issues

iOS vs Android

For me FlutterBeep.beep(true); repeats until turned off by FlutterBeep.beep(false); in Android. Whereas in iOS FlutterBeep.beep(true); just beeps one. Am I missing something?
Any way to repeat beep in iOS until turned off?

Will throw an Exception when running on the web

Because Platform is used to determine whether running on Android or iOS an exception will be thrown when deploying to the web. Consider switching to e.g. dart package universal_platform.

How to stop sound?

I've implemented flutter beep in my video calling app when user dials a call it will beep until other user picks up the call.
I don't know how to stop the beep when user picks up the call. Please help

Some sounds not stopping

Some of the sounds are calling again and again

LOW and HIGH ones for example

              FlutterBeep.playSysSound(
                  AndroidSoundIDs.TONE_CDMA_LOW_PBX_SS);

Can you update the package ?

Note: /Users/earminjon/.pub-cache/hosted/pub.dartlang.org/flutter_beep-1.0.0/android/src/main/java/com/gonoter/flutter_beep/FlutterBeepPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Flutter 3.19.0 Update

When updating flutter to 3.19.0 the app cannot compile anymore because of an Uint8List64() error. Please find the error below.

/.pub-cache/hosted/pub.dev/flutter_beep-1.0.0/android/src/main/java/com/gonoter/flutter_beep/FlutterBeepPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
../../../../../../.pub-cache/hosted/pub.dev/data_serializer-1.0.7/lib/src/platform_io.dart:14:35: Error: A value of type 'Uint8List Function()' can't be assigned to a variable of type 'Uint8List'.

  • 'Uint8List' is from 'dart:typed_data'.
    _maxSafeInt.toUint8List64().asUnmodifiableView;
    ^
    ../../../../../../.pub-cache/hosted/pub.dev/data_serializer-1.0.7/lib/src/platform_io.dart:17:35: Error: A value of type 'Uint8List Function()' can't be assigned to a variable of type 'Uint8List'.
  • 'Uint8List' is from 'dart:typed_data'.
    _minSafeInt.toUint8List64().asUnmodifiableView;

Getting MissingPluginException.

Calling in code FlutterBeep.beep(): Throwse this error in platform_channel.dart:

MissingPluginException(No implementation found for method stopSysSound on channel flutter_beep))

FlutterBeepPlugin.java uses or overrides a deprecated API

I'm excited for this package, but I receive these warnings when using the package for Android. Is this something we can fix easily?

Note: C:\Users\Joe.DESKTOP-4BRHLNO\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_beep-0.2.0\android\src\main\java\com\gonoter\flutter_beep\FlutterBeepPlugin.java uses or overrides a deprecated API.

error

android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java:24: error: package app.iandis.beep_player does not exist
flutterEngine.getPlugins().add(new app.iandis.beep_player.BeepPlayerPlugin());

Support null safety

It would be great to add support for null safety to the package in the near future. Thanks!

deprecated issues

package contains deprecated issues leads to warnings and possible unwanted behaviour

warning: [deprecation] Registrar in PluginRegistry has been deprecated
warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
warning: [deprecation] Registrar in PluginRegistry has been deprecated

FlutterBeepPlugin.java uses or overrides a deprecated API

Having this error when trying to run the example.

Note: D:\Users\<ME>\Git\flutter\flutter_beep\android\src\main\java\com\gonoter\flutter_beep\FlutterBeepPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
flutter doctor -v

[√] Flutter (Channel stable, 2.0.0, on Microsoft Windows [Version 10.0.21337.1010], locale nl-NL)
 • Flutter version 2.0.0 at C:\tools\flutter
 • Framework revision 60bd88df91 (3 weeks ago), 2021-03-03 09:13:17 -0800
 • Engine revision 40441def69
 • Dart version 2.12.0

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
 • Android SDK at D:\Users\user1\AppData\Local\Android\Sdk
 • Platform android-30, build-tools 30.0.2
 • ANDROID_SDK_ROOT = D:\Users\user1\AppData\Local\Android\Sdk
 • Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
 • All Android licenses accepted.

[√] Chrome - develop for the web
 • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
 • Android Studio at D:\Program Files\Android\Android Studio
 • Flutter plugin can be installed from:
    https://plugins.jetbrains.com/plugin/9212-flutter
 • Dart plugin can be installed from:
    https://plugins.jetbrains.com/plugin/6351-dart
 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code, 64-bit edition (version 1.54.2)
 • VS Code at C:\Program Files\Microsoft VS Code
 • Flutter extension version 3.20.0

[√] Connected device (3 available)
 • SM G398FN (mobile) • R58N9067KQV • android-arm64  • Android 10 (API 29)
 • Chrome (web)       • chrome      • web-javascript • Google Chrome 89.0.4389.90
 • Edge (web)         • edge        • web-javascript • Microsoft Edge 89.0.774.57

• No issues found!

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.