Tag Archives: preferences

6,647 views

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");

Posted in Android Examples Code | Tagged | Comments Off on Shared Preferences file path Android
1,933 views

How To Check New Version Of Application Android Code

private int _nVersionCode = 0; private boolean _bNewVersion = false;     // onCreate _nVersionCode = this.getPackageManager() .getPackageInfo(this.getPackageName(), 0).versionCode; Log.d(String.valueOf(_nVersionCode), "versionCode");   // onStart loadPreferences public void loadPreferences() { //SharedPreferences settings = getSharedPreferences(F.PREFERENCES_NAME, 0); SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this); int nOldVersionCode … Continue reading

Posted in Android Examples Code | Tagged | Comments Off on How To Check New Version Of Application Android Code
7,002 views

Preferences settings save open read write application Android example

Android app setup preferences, settings, open, read, write, onStop(), onPause(), getSharedPreferences(), SharedPreferences.Editor getInt(), getBoolean(), getString() , putInt(), putString(), putBoolean() example source code.   import android.content.SharedPreferences;   public class MainClass extends Activity { public static final String PREFERENCES_NAME = "MyPrefsFile"; String … Continue reading

Posted in Android Examples Code | Tagged , , , , , , , , | Comments Off on Preferences settings save open read write application Android example
8,829 views

How setup color coloring syntax code highlight highlighting in Eclipse editor Android example

How setup color coloring highlight highlighting syntax font size and family in Eclipse Java and XML editor Android example Java editor Go to Eclipse menu Window -> Preferences Doubleclick on Java Double click on Editor Select Java, Javadocs or Comments … Continue reading

Posted in Android Examples Code, Eclipse | Tagged , , , , , , , | Comments Off on How setup color coloring syntax code highlight highlighting in Eclipse editor Android example