Created
September 10, 2015 23:55
-
-
Save mortenjust/bec82a08c32fc950485f to your computer and use it in GitHub Desktop.
Check if preferences file exists #android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File f = new File( | |
"/data/data/your_application_package/shared_prefs/Name_of_your_preference.xml"); | |
if (f.exists()) | |
Log.d("TAG", "SharedPreferences Name_of_your_preference : exist"); | |
else | |
Log.d("TAG", "Setup default preferences"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment