Q1. What are the three principal data storage options in Android? Provide brief
ID: 3815728 • Letter: Q
Question
Q1. What are the three principal data storage options in Android? Provide brief description for each option.
Q2. In the simple list:
a. why it is necessary to use android:id attribute as
@id/android:list rather than using @+id/
b. How this changes the way to grab the ListView widget in the relevant java class instead of using findViewById method?
Q3. Clarify the benefits of using DialogFragment subclass as an alternative of using dialog helper methods in the Activity class.
Q4. Clarify the differences between the types of location sensors built-in to the mobile device. And how the Location information is accessed within an app?
Q5. Illustrate the concept of how sensors and managers used to access sensor data to create a compass that calculate the device heading.
Explanation / Answer
1.Data storage options in Android:
a. Network Connection:
User can store his data on the web by using his own network server. Network should be offered for this option. The user can make use of the network to store and retrieve data on the user's web based services. The packages for network connections:
i. java.net.*
ii. android.net.*
b. SQLite Database:
methods of SQLiteOpenHelper :
i. getReadableDatabase() - to read data from database
ii. getWritableDatabase() - to write data from database
iii. SQLiteDatabase query() - to select various database query such as selection, projection, column grouping and others.
c. Internal Storage:
d. External Storage:
The user can use a external device which can be microchip or external drive to store his public data or the data he feels he can give access to everyone.
e. Shared Preferences:
It is the option where user can save the private data in key-value pair. It provides a general framework for storing and retrieving data.
3.Benefits of using DialogFragment subclass as an alternative of using dialog helper methods in the Activity class:
4.Differences between the types of location sensors built-in to the mobile device. And how the Location information is accessed within an app:
Once your application has a LocationManager, your application is able to do three things:
1. Query for the list of all LocationProviders for the last known user location.
2. Register/unregister for periodic updates of the user's current location from a location provider.
3. Register/unregister for a known Intent to be fired if the device arises within a given proximity of a given lat/long.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.