Crash during cloud recording - crash

I want to run an app (any of iOS/Android/RN etc.) with Agora's cloud recording using the golang backend: https://github.com/AgoraIO-Community/Cloud-Recording-Golang
What happens if my app unexpectedly crashes? Can I still call the same recording endpoints to stop and check the state of the recording?

If an app integrated with cloud recording crashes, the recording session is not affected. You can continue to use the original resource ID and recording ID to control the recording instance, such as to query recording status or stop recording.
If a session is being recorded, you may need to add a heartbeat check to the server, to kill the record if there's no heartbeat in x time for example.

Related

How to keep streaming if initial client loses connection?

I'm working on an app that streams out multiple presenters via the Agora Live Streaming protocol. Everything works great so long as the person who started the live stream stays connected, however if they lose internet, the stream stops, even if other presenters are still online.
Is there a way to tell the live stream to keep going until "stop live streaming" is called (or all presenters are offline)? My code can handle updating the transcoding config (e.g. video layout) when they go offline.
After multiple discussions with Agora Support, it appears the answer is no, if only using the web SDK, however they are introducing a new server side feature to make this possible.
It's currently in beta, so you'll have to ask Agora Support to enable it for your account, but once you've done so you can create and update an RTMP converter via their server side API instead of relying on the client SDK to manage the stream: https://docs-preprod.agora.io/en/Interactive%20Broadcast/streaming_restful
I'm assuming you're using startLiveStreaming method using the Agora Web SDK. You can attach event listeners on all hosts to listen for primary host's online status, in case the primary host (the host that calls the start method) goes offline - a secondary host can call the start (and transcode) method.
You can also use Agora RTM to signal this status.

Cannot start audio only connection on react-native-webrtc

I’m using JsSIP and react-native-webrtc for audio only communication. I’ve managed to start session and get remote and local stream objects. Our SIP server converts voip calls to a normal phone call. I know I successfully start session because I can call my own phone number and answer it.
Since I can’t use RTCView I can’t play audio. And since there is no audio transmitting, server gives a time out after a while and stops session, and phone hangs up. How can I start sending and receiving sound?

How does apps like Whatsapp or telegram listen to the incoming call/message events on Android?

I built a VoIP calling app which maintains a persistent connection with the server to listen to any incoming calls. I implemented a background service to do this.
But since Oreo, this running code is now broken because of the introduction of Background Execution Limits
After looking into forums, I found that some people are suggesting
Convert Service to JobService and let android schedule it
Doing so, my app won't be able to receive calls when it is stopped
Run your operations in foreground services
It is annoying for some users to see a constant notification in the notification bar. So these above-mentioned options aren't working for me to fix my code for Oreo.
How does WhatsApp get the incoming (VOIP) call in Android (Oreo onwards) working around the Background Execution Limits?
(Sticky) foreground services are not affected by the restrictions. So you could use one those as replacement for background services on Oreo.
But foreground services have two disadvantages: They are less likely killed by the system in order to reclaim resources compared to background services, and hence affects the Android system's self-healing capability. And they require you to display a permanent notification. But Users are able to suppress the notification, somewhat mitigating this disadvantage.
I am assuming that you are using SIP to establish the connection and initiate calls. Without a service constantly re-sending REGISTERs, the app doesn't receive INVITEs when the server sends them.
A workaround for this problem is what is called the "push notification strategy". It works as follows, when the server sends a INVITE, it also sends an FCM notification to your app, This wakes up your app which then sends a REGISTER to your server, which in return forks the call to your app. Here is a video that better explains this strategy
There are two options:
use platform push services (APNS or FCM)
maintain persistent socket connection and exclude application from battery optimisations.

Check if process is running with VB.NET (Compact Framework 2.0)

I am working on an (console) application, which should be executed on startup and keeps running all the time in the background (executing something every 30 minutes).
How can I, in another (device) application, check if my console application is running (and start it if its not)?I am using VB.NET CF 2.0 and everything is being deployed on a device running WM 6.5
All the code examples I found where only available on the "standard" .NET.
There are several ways your "monitoring" app could work (and certainly more than I list here).
Use a named mutex (you'll have to P/Invoke it). The monitored app would create and hold it, and the monitoring app would periodically check to make sure it's held. If it's not held, the monitored app is no longer running.
Use the Toolhelp APIs. Have the monitoring app use the Toolhelp APIs to periodically enumerate the running processes. If the monitored app is not in the process list, it is not running.
Use a named event. The monitored app would have a background thread that periodically sets a named (watchdog) event. The monitoring app would wait on that event and if it fails to get the event in a certain time bound, the other app is either not running or has locked up.
Use a socket. Have the monitored app open a socket and listen on it. The monitor app would send a "ping" periodically to the monitored app. The monitored app would respond to the ping with an ack. If the monitoring app doesn't get an ack, the monitored app is either not running or is locked up
Use a window handle. The monitor app periodically P/Invokes GetWindow of FindWindow to find an always-present window in the monitored app - often by Form text. If the monitoring app can't find the Window, the monitored app is not running.

When does Windows cancel an in-flight WDF request?

I am writing a Windows device driver using WDF (KMDF) for a USB3 device that transfers data in large chunks at a time. I've written a user-level application that tests this functionality, and for the most part, things work.
The problem I encounter is this: I have found that when I force-close (CTRL+C from a cmd window) the application mid-transfer, the on-going data transfer at the time of cancel immediately stops and the host seems to simply stop communicating with that endpoint. I have observed this on a USB bus trace. The requests return in the function driver as "STATUS_CANCELLED"
I have looked at other similar third party devices and ran their test applications with their drivers on those devices and found that when I kill their test applications mid-data-transfer, the transfer completes before the application closes.
My question:
How/when does Windows decide to kill in-flight requests when applications are closed?
Is there any way to mark the request as "uncancelable"? I've scoured the documentation but found nothing that suggests I need to do something to keep requests from being cancelled behind the scenes mid-transfer.
Any insights appreciated, thanks.
It's not about the device driver; it's about the way the console application handles the Ctrl-C event. The console application must trap the Ctrl-C event, and wait for the transfer to finish before it exits.