I can prevent screen recording during the execution of the application with the following code. However, if I start the screen recorder first and then launch the application, the screen is recorded as a black screen. So far, everything is normal. I also want to prevent the screen recorder from capturing the audio files within my application. Is there a solution for this?
B4X:
#If Java
import android.annotation.TargetApi;
import android.content.Context;
import android.view.WindowManager.*;
public void _onCreate() {
this.getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE);
}
#End If