This is my code to store a value in sharedPreferences
SharedPreferences.Editor editor = context.getSharedPreferences("My_Table_name", Context.MODE_PRIVATE).edit();
editor.putString("my_key", "how Are You Bro...");
editor.apply();
editor.commit();
and I want to save it like this
File file = new File(Environment.getExternalStorageDirectory()+ "/.System/My_Table_Name");
SharedPreferences.Editor editor = context.getSharedPreferences(file, Context.MODE_PRIVATE).edit();
editor.putString("My_Key", "how Are You Bro...");
editor.apply();
editor.commit();
how can I do this?
getSharedPreferences(File file, int mode);
This method is available, but it's been removed. Earlier I've tried to copy this file, but for this method the app needs super user permission (rooted device).
What should I use?