Comments (18)
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?
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.
The same issue for me, any solution?
from flutter_playout.
Can you share some logs from the device? What's the exception you're seeing?
from flutter_playout.
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.
I test with .m3u8
and same problem occur
from flutter_playout.
What's the exception you see?
from flutter_playout.
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.
@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.
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.
My url is https://s18.maxcast.com.br:8010/autodj.m3u
from flutter_playout.
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.
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.
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.
@KhuramKhalid Thank you for help me, it work now and I'll look my server
from flutter_playout.
@vvasc you've welcome. @hemadri-divii @Batres35 are you still having this issue?
from flutter_playout.
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.
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?
from flutter_playout.
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?
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)
- java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference HOT 6
- [Question] Youtube video HOT 2
- How to get the call back before and after player gets initialized HOT 3
- Can't mix audio if audio is already playing
- flutter android v2 embedding missing HOT 4
- iOS lock screen previous next buttons
- Question about iOS lock screen display
- 1
- A bug for Picture In Picture when back to home screen HOT 1
- Error playing video - Trying to create a platform view of unregistered type: tv.mta/NativeVideoPlayer - 2.0.2-rc1 HOT 6
- FAILURE: Build failed with an exception. HOT 1
- App Crash on Video Play. HOT 2
- Speed Controller
- deprecated HOT 1
- PIP not working
- flutter_playout/VideoPlayer.swift:159
- Can't play video in Android 12 playstore build.
- Cannot play audio HOT 1
- can not use this HOT 4
- Play media from user data resource
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_playout.