Coder Social home page Coder Social logo

Comments (18)

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024 1

When i play the audio the app crashes and i get this error on Android Studio:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.app, PID: 26629
java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=NotificationBarController pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 category=transport actions=1 number=0 vis=PUBLIC semFlags=0x0 semPriority=0 semMissedCount=0)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:333)
at android.app.NotificationManager.notify(NotificationManager.java:297)
at android.app.NotificationManager.notify(NotificationManager.java:281)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updateNotification(AudioServiceBinder.java:551)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updatePlaybackState(AudioServiceBinder.java:496)
at tv.mta.flutter_playout.audio.AudioServiceBinder.onPrepared(AudioServiceBinder.java:322)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:4120)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

I've set this value in AndroidManifest.xml but it still without work:

meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_launcher"

I'm using the package "flutter_launcher_icons: ^0.7.4" for generate the icons of my app, can this be the problem?

Captura de Pantalla 2020-02-18 a la(s) 12 46 17

Yes so the issue here is definitely the icon. What you can do is just manually create a notification icon and call it ic_notification_icon. That should resolve the issue.

from flutter_playout.

Batres35 avatar Batres35 commented on June 5, 2024

The same issue for me, any solution?

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

Can you share some logs from the device? What's the exception you're seeing?

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

Same problem here, on iOS works fine, but when I try on Android phones the app crashes. This may happens because I'm using an .m3u to listen audio.

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

I test with .m3u8 and same problem occur

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

What's the exception you see?

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

One reason for an app crash could be that the notification icon (ic_notification_icon) isn't setup for Android project. That definitely causes apps to crash on Android.

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

@KhuramKhalid Even with ic_notification_icon the app crash. In example provided in package the same problem occur on Android. Could you provide an example to solve that?

I'm using to configure my notification_icon in Android Manifest:

         <meta-data
            android:name="com.google.firebase.messaging.default_notification_icon"
            android:resource="@drawable/ic_notification_icon"/>

Thank you for fast answer and to maintain this repo

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

That config looks good so notification icon isn't an issue. Would it be possible for you to share your m3u8 url? We're using this player with our video on demand app which also includes live streaming and all assets are HLS (m3u8) and they all work fine. So not sure what the issue is. Will have to dig deeper. Also if possible, please share device logs from Android Studio when the app crashes.

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

My url is https://s18.maxcast.com.br:8010/autodj.m3u

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

Using an external Android device I've a strange behaviour, without crash, but also without the audio playing and override error function i got:

"MEDIA_ERROR_UNKNOWN: Unspecified media player error"

With iOS, using emulator or external devices everything works properly

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

My url is https://s18.maxcast.com.br:8010/autodj.m3u

Sorry I wasn't able to look at it earlier and now it seems the service is offline. Please let me know when it's up and I'll have a look.

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

Ok so I was able to play it with the sample app. Firstly use this url https://s18.maxcast.com.br:8010/autodj instead of .m3u. Secondly, it take about 30 seconds after pressing play button for the audio to start. Not sure why that delay is, probably some config issue on server side.

from flutter_playout.

vvasc avatar vvasc commented on June 5, 2024

@KhuramKhalid Thank you for help me, it work now and I'll look my server

from flutter_playout.

KhuramKhalid avatar KhuramKhalid commented on June 5, 2024

@vvasc you've welcome. @hemadri-divii @Batres35 are you still having this issue?

from flutter_playout.

Batres35 avatar Batres35 commented on June 5, 2024

One reason for an app crash could be that the notification icon (ic_notification_icon) isn't setup for Android project. That definitely causes apps to crash on Android.

i'm gonna try this and then i tell you, thanks for your answer.

from flutter_playout.

Batres35 avatar Batres35 commented on June 5, 2024

When i play the audio the app crashes and i get this error on Android Studio:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.app, PID: 26629
java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=NotificationBarController pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 category=transport actions=1 number=0 vis=PUBLIC semFlags=0x0 semPriority=0 semMissedCount=0)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:333)
at android.app.NotificationManager.notify(NotificationManager.java:297)
at android.app.NotificationManager.notify(NotificationManager.java:281)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updateNotification(AudioServiceBinder.java:551)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updatePlaybackState(AudioServiceBinder.java:496)
at tv.mta.flutter_playout.audio.AudioServiceBinder.onPrepared(AudioServiceBinder.java:322)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:4120)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

I've set this value in AndroidManifest.xml but it still without work:

meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_launcher"

I'm using the package "flutter_launcher_icons: ^0.7.4" for generate the icons of my app, can this be the problem?

Captura de Pantalla 2020-02-18 a la(s) 12 46 17

from flutter_playout.

Batres35 avatar Batres35 commented on June 5, 2024

When i play the audio the app crashes and i get this error on Android Studio:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.app.app, PID: 26629
java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=NotificationBarController pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x0 color=0x00000000 category=transport actions=1 number=0 vis=PUBLIC semFlags=0x0 semPriority=0 semMissedCount=0)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:333)
at android.app.NotificationManager.notify(NotificationManager.java:297)
at android.app.NotificationManager.notify(NotificationManager.java:281)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updateNotification(AudioServiceBinder.java:551)
at tv.mta.flutter_playout.audio.AudioServiceBinder.updatePlaybackState(AudioServiceBinder.java:496)
at tv.mta.flutter_playout.audio.AudioServiceBinder.onPrepared(AudioServiceBinder.java:322)
at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:4120)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7000)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

I've set this value in AndroidManifest.xml but it still without work:

meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@mipmap/ic_launcher"

I'm using the package "flutter_launcher_icons: ^0.7.4" for generate the icons of my app, can this be the problem?
Captura de Pantalla 2020-02-18 a la(s) 12 46 17

Yes so the issue here is definitely the icon. What you can do is just manually create a notification icon and call it ic_notification_icon. That should resolve the issue.

Yeah, thats was the problem, thanks a lot!

from flutter_playout.

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.