GithubHelp home page GithubHelp logo

aliyazdi75 / flutter_media_notification Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 27.0 108 KB

Flutter Media Notification helps you to show your media notification and control streaming media beyond your flutter app. https://pub.dev/packages/flutter_media_notification

License: MIT License

Java 59.56% Swift 5.86% Objective-C 2.80% Dart 25.26% Ruby 4.02% Shell 2.50%
dart dart-packages flutter flutter-media-notification listener music notification

flutter_media_notification's People

Contributors

aliyazdi75 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

Watchers

 avatar  avatar  avatar

flutter_media_notification's Issues

Attempt to invoke virtual method 'android.content.Context android.app.Activity.getApplicationContext()' on a null object reference

before I use flutter downloader package it worked correctly.
i am already use flutter downloader in my app but your package throw this error.

E/AudioplayersPlugin(31951): Unexpected error!
E/AudioplayersPlugin(31951): java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Activity.getApplicationContext()' on a null object reference
.
.
.
E/MethodChannel#xyz.luan/audioplayers(31951): java.lang.IllegalArgumentException: Unsupported value: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Activity.getApplicationContext()' on a null object reference

what do I should Do ?

Crashlytics on Samsung phones

I am seeing a lot of these errors

Caused by java.lang.IllegalStateException
Could not find any Service that handles android.intent.action.MEDIA_BUTTON or implements a media browser service.
androidx.media.session.MediaButtonReceiver.onReceive (MediaButtonReceiver.java:13)
android.app.ActivityThread.handleReceiver (ActivityThread.java:3624)
android.app.ActivityThread.access$1300 (ActivityThread.java:240)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1817)
android.os.Handler.dispatchMessage (Handler.java:106)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7124)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:975)

Was sure what library was causing this but then noticed this in the manifest

   <receiver android:name="com.tarafdari.flutter_media_notification.NotificationReturnSlot" />
    <receiver android:name="androidx.media.session.MediaButtonReceiver" >
        <intent-filter>
            <action android:name="android.intent.action.MEDIA_BUTTON" />
        </intent-filter>
    </receiver>

Not sure why the error is occuring.

[enhancements] couple of things to add

first Thank you for the package.
I will be adding those things below, and I would like if you have any comments or suggestions:

  • refactor the api, use const instead of strings ...

notification style

  • optional btns (allow enabling and disabling, like previous and next btns ..)
  • custom small Icon
  • custom Large Icon

I will make PRs asap I have something ready, thanks

Please do Add Notification Image Support

Fix the issue of showing only the same notification icon to all the Media Notifications, Please add an option to pass the Path of the image file to the MediaNotification.showNotification so that we could pass the image to be displayed on the notification.
Also, Thank You For Creating This.

Use cover image.

Thank you for the package. Can cover image be used in notification?

music not stop when removing app from background

i m using this library for media notification and audioplayers library for song play when i play song then i have set notification using setNotification method..music play in background perfectly bt when i remove app from home button directly(from recent apps) without back press,music play in background continuosly ..without using this library music stop when i am removing it from background but with this library it not working.

Plugin fails to build everytime. Tried "flutter clean" and some other steps, but didn't help.(I've marked the log for same in bold, rest of the jettifier log is from another package which passes everytime)

Launching lib\main.dart on Redmi Note 7 Pro in debug mode...
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:8: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:9: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
^
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:10: error: package android.support.v7.app does not exist
import android.support.v7.app.AppCompatActivity;
^
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:15: error: cannot find symbol
public static boolean hasExternalStorageAccess(AppCompatActivity activity) {
^
symbol: class AppCompatActivity
location: class MusicHelper
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:16: error: cannot find symbol
if(ContextCompat.checkSelfPermission(activity, Manifest.permission.READ_EXTERNAL_STORAGE)
^
symbol: variable ContextCompat
location: class MusicHelper
C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicHelper.java:19: error: cannot find symbol
ActivityCompat.requestPermissions(activity,
^
symbol: variable ActivityCompat
location: class MusicHelper
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicFinderPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flute_music_player-0.0.6\android\src\main\java\com\mtechviral\musicfinder\MusicFinderPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flute_music_player:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org

BUILD FAILED in 4s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin flute_music_player...
โˆš Built build\app\outputs\repo.
Building plugin flutter_keyboard_visibility...
โˆš Built build\app\outputs\repo.
Building plugin flutter_media_notification...
The plugin flutter_media_notification could not be built due to the issue above.
Exited (sigterm)

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.