Shared Preferences file path Android

/data/data/<package>/shared_prefs/<package>_preferences.xml
 
String TAG = "MyActivityName";
File f = new File("/data/data/"+this.getPackageName()
+"/shared_prefs/"+this.getPackageName()+"_preferences.xml");
if(f.exists())
	Log.d(TAG, "exist");
else
	Log.d(TAG, "not exist");
This entry was posted in Android Examples Code and tagged . Bookmark the permalink.


Comments are closed.



9,606 views