0% found this document useful (0 votes)
47 views

MC Unit 5 Notes

2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

MC Unit 5 Notes

2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

1 CTH EDUCATION

Unit – 05: Mobile Computing


 Storing the data persistently –
 Data Storage Options: preferences, Internal Storage, External Storage, Content Provider.
 The SQLite database,
 Database operations -Insert, Delete, Update, Fetch.
 Publishing android applications,
 Deploying APK files.

Questions to be discussed:
1. What do you mean by data persistent?
2. Explain different data storage options in an android.
3. What is SQLite database? Discuss its advantage & disadvantage.
4. Discuss various operations performed on SQLite database
5. What is APK? How to develop APK files?

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
2 CTH EDUCATION
Storing the data persistently:
 Persistent storage is any data storage device that retains data after power to that device is shut off.
 It is also sometimes referred to as non-volatile storage.
 Android provides several options for you to save persistent application data.
 Your data storage options are the following:
1. Shared Preferences
2. Internal Storage
3. External Storage
4. Content provider
5. SQLite Databases

Shared Preferences:
 Store private primitive data in key-value pairs.
 The Shared Preferences class provides a general framework that allows you to save and retrieve
persistent key-value pairs of primitive data types.
 You can use Shared Preferences to save any primitive data: boolean, floats, int, long, and string.

Internal Storage:
 Store private data on the device memory.
 You can save files directly on the device's internal storage.
 By default, files saved to the internal storage are private to your application
and other applications cannot access them (nor can the user).
 When the user uninstalls your application, these files are removed.

External Storage:
 Store public data on the shared external storage.
 External storage is used to store application data, such as SD card.
 In general there are two types of External Storage:
1. Primary External Storage
2. Secondary External Storage

Primary External Storage:


 It is in-built shared storage which is “accessible by the user by plugging in a USB cable.
 Example: When we say 4GB, 32 GB.

Secondary External Storage:


 It is type of storage which is removed from the android if required.
 It is also known as removable storage. Example: SD Card

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
3 CTH EDUCATION
Content provider:
 A content provider component supplies data from one application to others on request.
 Such requests are handled by the methods of the Content Resolver class.
 A content provider can use different ways to store its data and the data can be stored in a database, in
files, or even over a network.
 Sometimes it is required to share data across applications then content providers become very useful.

What is database?
 It is an organized collection of structured information or data that stored electronically in computer.
 A database is usually controlled and managed by database management system (DBMS).
 Most commonly used database is SQL.
 SQLite database is used in android.

Android SQLite Database:


 SQLite is an open source relational database.
 It is lighter version of SQL.
 Android comes with built-in SQLite database implementation.
 To access this database, you do not need to establish any kind of connections like JDBC, ODBC etc.
 Main components of SQLite is:
 Table structure (Rows and columns).
 Types of data (int, float, char, double, Boolean etc).
 Constraints (Primary and secondary key).
 Queries (Select, Insert, Update and Delete).

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)
4 CTH EDUCATION
SQLite Advantages SQLite Disadvantages
 Lightweight  SQLite is used to handle low to medium traffic HTTP requests.
 Better Performance  Database size is restricted to 2GB in most cases.
 No Installation Needed
 Portable

Insert, Read, Delete & Update operation in SQLite:


 Android provides different ways to store data locally so using SQLite is one of the way to store data.
 For managing all the operations related to the database, an helper class has been given and is called
SQLiteOpenHelper.
 It automatically manages the creation and update of the database.
 Android OS has its own implementation to perform CRUD operations.
1. Create
2. Read
3. Update
4. Delete

What is APK?
 APK stand for Android Application Package.
 It is a package file format used by android OS for distribution and installation of mobile app.
 It is similar to executable file .exe in windows operating system.
 The extension of APK file is .apk.
 It is installed on android operating system.

Publishing Android Application:


 Android application publishing is a process that makes your Android applications available to users.
 Infect, publishing is the last phase of the Android application development process.
 Once you developed and fully tested your Android Application, you can start selling or distributing free
using Google Play Store.
 You can also release your applications by sending them directly to users or by letting users download
them from your own website.

Diploma : CSE (All Paper) By : Alok Sir (Mob. No.: +91-80 84 370 470)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy