Use RtmpOnlyAudio. When I step back to the background after the App successfully pushes the audio stream, the other device cannot receive the audio stream pushed by me after the voice call lasts for one minute
I use RtmpOnlyAudio to push audio streams to the Nginx server. When the App pushes the audio streams successfully, I step back to the background. After the voice call lasts for one minute, the other device cannot receive the audio streams I push, but RtmpOnlyAudio The callback method has always been onNewBitrateRtmp, so I would like to ask what specifically caused the voice call to be silent after my App retreated to the background for one minute
This is the log from AndroidStadio
App back in the background for one minute, push audio no sound, this is the Nginx log

My colleague's ios app doesn't have this problem, and it works fine for more than half an hour after it's retreated into the background
Finally, I solved this problem because the microphone permissions will be cancelled when the android is back in the background, so I need to open a foreground service and keep the microphone permissions running all the time, so that I can keep the voice.
Hello author, I have a problem now. My App pushes the audio stream in the foreground for voice call. After 12 minutes or 20 minutes of talk time, the other party can't hear my voice. However, I have seen my day and there is no wrong or disconnected callback, but I still keep talking. Can the writer help me to see what the situation is
Hello, I encountered a problem when I was using RtmpOnlyAudio to develop voice calls. When I started to push the stream to apply for voice rights, the user allowed the voice rights. At this time, I entered the phone setting interface, selected my App, and manually added the geographical location or call rights. Then I entered my App again and started to push the stream (See the worklog), the push will work, but the onConnectionSuccessRtmp callback will not happen again
Work log
2023-01-06 09:58:09.732 E/CME Player: RtmpOnlyAudio,onConnectionSuccessRtmp=====onConnectionSuccessRtmp 2023-01-06 09:58:09.941 E/TAG: RtmpOnlyAudio,onNewBitrateRtmp=====onNewBitrateRtmp410 2023-01-06 09:58:10.143 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====BadName received, endpoint in use. 2023-01-06 09:58:10.143 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.223 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====BadName received, endpoint in use. 2023-01-06 09:58:10.224 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.355 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====Error configure stream, publish permitted failed 2023-01-06 09:58:10.355 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.356 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:10.356 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====BadName received, endpoint in use. 2023-01-06 09:58:10.356 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.557 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====Error configure stream, publish permitted failed 2023-01-06 09:58:10.557 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.559 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:10.635 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====BadName received, endpoint in use. 2023-01-06 09:58:10.635 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.777 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:10.947 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====Error configure stream, publish permitted failed 2023-01-06 09:58:10.947 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:10.948 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:11.057 E/TAG: RtmpOnlyAudio,onNewBitrateRtmp=====onNewBitrateRtmp64372 2023-01-06 09:58:11.125 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:11.288 E/TAG: RtmpOnlyAudio,RtmpOnlyAudio=====Error configure stream, publish permitted failed 2023-01-06 09:58:11.288 E/TAG: RtmpOnlyAudio,onConnectionFailedRtmp=====onConnectionFailedRtmp 2023-01-06 09:58:11.290 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:11.435 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:11.604 E/TAG: RtmpOnlyAudio,onDisconnectRtmp=====onDisconnectRtmp 2023-01-06 09:58:12.177 E/TAG: RtmpOnlyAudio,onNewBitrateRtmp=====onNewBitrateRtmp67678 2023-01-06 09:58:12.177 E/TAG: RtmpOnlyAudio,onNewBitrateRtmp=====onNewBitrateRtmp77678 //At this point, the voice call can communicate normally, and the onNewBitrateRtmp method is called back //At this point, the voice call can communicate normally, and the onNewBitrateRtmp method is called back //At this point, the voice call can communicate normally, and the onNewBitrateRtmp method is called back
Hello,
About the first one (audio fail after 12min). I recommend you check that your audio is working fine before send it. You can use startRecord method to check it because the buffer is the same for stream and record.
About the second one. It is really weird, try to recreate the class after return to your activity to reset all
Closing as inactive.