Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Describe SharedPreference storage option with example.



Describe SharedPreference storage option with example...

Answer / shubhraneel

If we talk about Android, then there are many ways in which it stores data of application. One way is by Shared Preferences. Shared Preferences allow you to save and retrieve data in the form of key,value pair.

In order to use shared preferences , you have to call a method getSharedPreferences() that returns a SharedPreference instance pointing to the file that contains the values of preferences.

example: SharedPreferences sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);

In the above example The first parameter is the key and the second parameter is the MODE

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Android OS Interview Questions

Which activity class do you need to inherit to show google map?

0 Answers  


What are broadcast receivers?

0 Answers  


Is android lollipop still supported?

0 Answers  


What is the android:versioncode attribute in the androidmanifest.xml file?

0 Answers  


What is api level, codename of android 5.0 – 5.1?

0 Answers  


How do I turn on auto sync on android?

0 Answers  


which language is supported by android for application development?

0 Answers  


Does selenium support google android operating system?

0 Answers  


What is android ndk?

0 Answers  


What is the API profile exposed by Mono for Android?

1 Answers  


What is android:oneshot?

0 Answers  


Why bytecode cannot be run in android?

0 Answers  


Categories