muslimtv / flutter_playout

AV Playout in Flutter
BSD 3-Clause "New" or "Revised" License
154 stars 93 forks source link

Example app Crashes on playing valid audio #45

Closed egyleader closed 4 years ago

egyleader commented 4 years ago

I've tried to play real link audio on the example app audio player and the app crashes once I hit play

the url I've tried to play : https://download.tvquran.com/download/selections/224/59136e042760a.mp3

the app log :

Launching lib\main.dart on JKM LX1 in debug mode... √ Built build\app\outputs\apk\debug\app-debug.apk. D/FlutterActivity(19527): Using the launch theme as normal theme. D/FlutterActivityAndFragmentDelegate(19527): Setting up FlutterEngine. D/FlutterActivityAndFragmentDelegate(19527): No preferred FlutterEngine was provided. Creating a new FlutterEngine for this FlutterFragment. D/FlutterActivityAndFragmentDelegate(19527): Attaching FlutterEngine to the Activity that owns this Fragment. D/FlutterView(19527): Attaching to a FlutterEngine: io.flutter.embedding.engine.FlutterEngine@b6b8f32 D/FlutterActivityAndFragmentDelegate(19527): Executing Dart entrypoint: main, and sending initial route: / D/AwareBitmapCacher(19527): handleInit switch not opened pid=19527 W/Settings(19527): Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global. V/HiTouch_HiTouchSensor(19527): User setup is finished. V/AudioManager(19527): playSoundEffect effectType: 0 V/AudioManager(19527): querySoundEffectsEnabled... V/MediaHTTPService(19527): MediaHTTPService(android.media.MediaHTTPService@dec7473): Cookies: null V/MediaHTTPService(19527): makeHTTPConnection: CookieManager created: java.net.CookieManager@ddf12e V/MediaHTTPService(19527): makeHTTPConnection(android.media.MediaHTTPService@dec7473): cookieHandler: java.net.CookieManager@ddf12e Cookies: null D/NetworkSecurityConfig(19527): No Network Security Config specified, using platform default V/PlayerBase(19527): baseStart() piid=11543 I/MediaPlayer(19527): [HSM] stayAwake true uid: 10391, pid: 19527 I/MediaPlayerNative(19527): Pid:19527 MediaPlayer::start D/MediaPlayerNative(19527): Action:start, CurrentState:MEDIA_PLAYER_STARTED D/AndroidRuntime(19527): Shutting down VM E/AndroidRuntime(19527): FATAL EXCEPTION: main E/AndroidRuntime(19527): Process: com.example.testplayer, PID: 19527 E/AndroidRuntime(19527): 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 vis=PUBLIC) E/AndroidRuntime(19527): at android.app.NotificationManager.notifyAsUser(NotificationManager.java:393) E/AndroidRuntime(19527): at android.app.NotificationManager.notify(NotificationManager.java:371) E/AndroidRuntime(19527): at android.app.NotificationManager.notify(NotificationManager.java:347) E/AndroidRuntime(19527): at tv.mta.flutter_playout.audio.AudioServiceBinder.updateNotification(AudioServiceBinder.java:551) E/AndroidRuntime(19527): at tv.mta.flutter_playout.audio.AudioServiceBinder.updatePlaybackState(AudioServiceBinder.java:496) E/AndroidRuntime(19527): at tv.mta.flutter_playout.audio.AudioServiceBinder.onPrepared(AudioServiceBinder.java:322) E/AndroidRuntime(19527): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:3584) E/AndroidRuntime(19527): at android.os.Handler.dispatchMessage(Handler.java:112) E/AndroidRuntime(19527): at android.os.Looper.loop(Looper.java:216) E/AndroidRuntime(19527): at android.app.ActivityThread.main(ActivityThread.java:7625) E/AndroidRuntime(19527): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(19527): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) E/AndroidRuntime(19527): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) I/Process (19527): Sending signal. PID: 19527 SIG: 9 Lost connection to device. Exited (sigterm)

KhuramKhalid commented 4 years ago

Please setup a notification icon in your Android project as mentioned in the getting started. E/AndroidRuntime(19527): java.lang.IllegalArgumentException: Invalid notification (no valid small icon): Notification(channel=NotificationBarController pri=0 contentView=null

egyleader commented 4 years ago

Thanks .. That solved the problem 😅