Comment désactiver la capture d'écran dans React Native
// go to android/app/src/main/java/com/yourPackageName/MainActivity.java
package com.yourPackageName;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
// Add This Line
import android.view.WindowManager;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "bannermaker";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add this line
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
}
}
Outstanding Oryx