red5pro / react-native-red5pro

React Native Red5 Pro Publisher/Subscriber
https://www.red5pro.com/
Other
34 stars 20 forks source link

Android background streaming crash: Bad notification for startForeground #59

Closed chungweileong94 closed 4 years ago

chungweileong94 commented 4 years ago

On Android (RN 0.63.1), if the app go to background while stream (with background streaming enable), the app will crash.

Here's the error:

android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=null pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)
chungweileong94 commented 4 years ago

Apparently, the app will crash if the Android version is >=28. I submitted a PR https://github.com/red5pro/react-native-red5pro/pull/60 for the fix.

chungweileong94 commented 4 years ago

Resolved in #60