• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

disable sdcard access by code

Jasmin74

Member
I want to disable a user from using the sd card on his samsung tablet (Android 6-7) . No problem when we make a full flash or recovery to use it again. How can we do it by code? I received this: public static boolean isConnected(Context context) { intent = context.registerReceiver(null, new IntentFilter("android.hardware.usb.action.USB_STATE")); return intent.getExtras().getBoolean("connected"); } is it correct? & is there a tutorial how can I execute it into the tablet? P.S: I've checked all the similar questions.
 
Back
Top Bottom