Referencing a string in a string array resource with xml

In short: I don’t think you can, but there seems to be a workaround:. If you take a look into the Android Resource here: http://developer.android.com/guide/topics/resources/string-resource.html You see than under the array section (string array, at least), the “RESOURCE REFERENCE” (as you get from an XML) does not specify a way to address the individual items. … Read more

Android: Retrieving shared preferences of other application

Okay! using this code in Application 1 ( with package name is “com.sharedpref1” ) to store data with Shared Preferences. SharedPreferences prefs = getSharedPreferences(“demopref”, Context.MODE_WORLD_READABLE); SharedPreferences.Editor editor = prefs.edit(); editor.putString(“demostring”, strShareValue); editor.commit(); And using this code in Application 2 to get data from Shared Preferences in Application 1. We can get it because we use … Read more

What is the most appropriate way to store user settings in Android application

In general SharedPreferences are your best bet for storing preferences, so in general I’d recommend that approach for saving application and user settings. The only area of concern here is what you’re saving. Passwords are always a tricky thing to store, and I’d be particularly wary of storing them as clear text. The Android architecture … Read more