Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


What are the different storage methods in Androids?
Question Posted on 31 Aug 2020

Home >> Android >> Android Interview Questions >> What are the different storage methods in Androids?




What are the different storage methods in Androids?
As all of us know every non-trival application will have to store data in one or another way. And data can be any of any forms like user settings, application settings, user data, images or some cache data. Below are several options to see persistent application data:-
(1)Shared Preferences
(2)Internal Storage
(3)External Storage
(4)SQLite Databases

(1)Shared Preferences:-We generally use this to save primitive data in key-value pairs. Here key must be a string and value can of one like Boolean, float, int long or can be of string. Internally it will stores data in XML file in private directory. An app can have multiple Shared Preferences files. Ideally, you will want to use Shared preferences to store application preferences.

(2)Internal Storage:-As we also know there are lots of situation where we want persist data but we also know there is limit on shared preferences. The Internal Storage data storage method is specifically for those situations where you need to store data to the device filesystem. And this data we not want to read by other app.

(3)External Storage:-app_private folder is located in the Android/data directory, and is also deleted when your app is uninstalled. To save (and/or read) files to the device’s external storage, your app must request for the WRITE_EXTERNAL_STORAGE permission. If you only want to read from the External Storage without writing, request for the READ_EXTERNAL_STORAGE permission. From Android 4.4, we can actually write to a “private” external storage folder without requesting WRITE_EXTERNAL_STORAGE.

(4)SQLite Databases:-Android provides support for apps to use SQLite databases for data storage. Databases created are app specific, and are available to any class within the app.
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Can we change the name of any application after its deployment in Android?
What is DDMS and its features?
Code to call another activity in Android?
What is Android and used for
What is Open Handset Alliance (OHA)






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |