Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to disable screenshot in 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);
  }
}
Comment

PREVIOUS NEXT
Code Example
Java :: spring security after login redirect 
Java :: selection sort linked list java 
Java :: how to get string input line in java 
Java :: Java LogManager 
Java :: java loops 
Java :: Java String equal String 
Java :: initilize an array java 
Java :: can i call another function from main hava 
Java :: return two values in java 
Java :: a?che les paramètres de la ligne de commande triés par ordre lexicographique en java 
Java :: what is constructor in java 
Java :: practical1_answer 
Java :: debug cxf 
Java :: java print a line seperate by space 
Java :: android studio hide linearlayout 
Java :: stream.concat 
Java :: how to convert character into operator 
Java :: video compression with java 
Java :: count true in matrix java 
Java :: java stream code to ignore null 
Java :: selenium drag slider 
Java :: java bogo sort 
Java :: how to hash string in java 
Java :: map.keyset 
Java :: check if input is empty java 
Java :: java string equals null 
Java :: instance of 
Java :: seek bar 
Java :: search 
Java :: Java Define a Functional Interface in java 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =