Data storage and exchange in Android

Size: px
Start display at page:

Download "Data storage and exchange in Android"

Transcription

1 Mobile App Development

2 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

3 Overview 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

4 Options we have Outline Overview SharedPreferences Implements named maps of name/value pairs that can be persisted across sessions and shared among application components running within the same application sandbox.

5 Options we have Outline Overview SharedPreferences Implements named maps of name/value pairs that can be persisted across sessions and shared among application components running within the same application sandbox. SQLite Is a SQL implementation.

6 Options we have Outline Overview SharedPreferences Implements named maps of name/value pairs that can be persisted across sessions and shared among application components running within the same application sandbox. Content provider An interface used between applications. The server application that hosts the data manages it through basic create, read, update, and delete (CRUD) operations. SQLite Is a SQL implementation.

7 Options we have Outline Overview SharedPreferences Implements named maps of name/value pairs that can be persisted across sessions and shared among application components running within the same application sandbox. SQLite Is a SQL implementation. Content provider An interface used between applications. The server application that hosts the data manages it through basic create, read, update, and delete (CRUD) operations. Files Local files stored in shared or app specific space

8 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

9 How it works? are stored within the application s sandbox, so they can be shared between application s components but aren t available to other applications.

10 How it works? are stored within the application s sandbox, so they can be shared between application s components but aren t available to other applications. How to use it? To modify a Shared Preference, use the SharedPreferences.Editor class. Get the Editor object by calling edit on the object you want to change. Use editor.putxxxx([name], [val]) to add preferences and editor.getxxxx([name]) to retrieve.

11 User Preferences Outline Use built-in PreferencesActivity Creating your own Activity to control user preferences is considered bad practice. Android Studio provides you with a standard settings screen using the Settings Activity.

12 User Preferences Outline Use built-in PreferencesActivity Creating your own Activity to control user preferences is considered bad practice. Android Studio provides you with a standard settings screen using the Settings Activity. Question Why is building custom settings activity a bad practice?

13

14 SQLite Overview Implementation 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

15 SQLite Outline SQLite Overview Implementation Android uses the SQLite database engine: self-contained, transactional, requires no separate server process, actively developed by a large community

16 SQLite Overview Implementation What is SQLite? SQLite is an international, open source project implementing a transactional, self-contained relational database. It is not a Google project, but Google has contributed to it.

17 SQLite Overview Implementation How it is stored? With SQLite, the database is a simple single disk file. All of the data structures making up a relational databasetables, views, indexes, etc.are within this file.

18 Before we start Outline SQLite Overview Implementation Good practices It is a good practice to separate database specific code from the rest of your application and encapsulate it in a single class. Other classes should use standard Java classes or Cursors and be unaware of how the data is actually stored.

19 SQLite Overview Implementation

20 Schema and Contract Outline SQLite Overview Implementation Schema A formal declaration of how the database is organized. The schema is reflected in the SQL statements that you use to create your database. Contract A companion class, which explicitly specifies the layout of your schema in a systematic and self-documenting way.

21 SQLite Overview Implementation Why do we need a Contract class? A contract class is a container for constants that define names for URIs, tables, and columns. The contract class allows you to use the same constants across all the other classes in the same package. This lets you change a column name in one place and have it propagate throughout your code. A good way to organize a contract class is to put definitions that are global to your whole database in the root level of the class. Then create an inner class for each table that enumerates its columns.

22 Note:BaseColumns Outline SQLite Overview Implementation Note By implementing the BaseColumns interface, your inner class can inherit a primary key field called _ID that some Android classes such as cursor adaptors will expect it to have. It s not required, but this can help your database work harmoniously with the Android framework.

23 Example Outline SQLite Overview Implementation 1 p u b l i c f i n a l c l a s s F e e d R e a d e r C o n t r a c t { 2 // To p r e v e n t someone from a c c i d e n t a l l y i n s t a n t i a t i n g t h e c o n t r a c t c l a s s, 3 // g i v e i t an empty c o n s t r u c t o r. 4 p u b l i c F e e d R e a d e r C o n t r a c t ( ) {} 5 6 / I n n e r c l a s s t h a t d e f i n e s t h e t a b l e c o n t e n t s / 7 p u b l i c s t a t i c a b s t r a c t c l a s s FeedEntry implements BaseColumns { 8 p u b l i c s t a t i c f i n a l S t r i n g TABLE NAME = e n t r y ; 9 p u b l i c s t a t i c f i n a l S t r i n g COLUMN NAME ENTRY ID = e n t r y i d ; 10 p u b l i c s t a t i c f i n a l S t r i n g COLUMN NAME TITLE = t i t l e ; 11 p u b l i c s t a t i c f i n a l S t r i n g COLUMN NAME SUBTITLE = s u b t i t l e ; } 14 }

24 Database interface Outline SQLite Overview Implementation We will implement a class MyDatabaseManager serving as an interface to the database. It extends the abstract SQLiteOpenHelper class, and therefore must override the oncreate and onupgrade methods.

25 SQLite Overview Implementation oncreate Automatically called when the application starts for the first time; its job is to create the database onupgrade Used to update a database on the phone when new version of the application is shipped

26 General elements of the class SQLite Overview Implementation Constants DATABASE NAME holds the filename of the database DATABASE VERSION defines the database version understood by the software that defines the constant. If the version of the database on the machine is less than DATABASE VERSION, the application should run onupgrade

27 General elements of the class SQLite Overview Implementation Constructor call constructor from super store a context object (usually an activity that opens the database)

28 oncreate Outline SQLite Overview Implementation You can use two approaches to the implementation that are : Embedded SQL SQL commands are embedded into Java. The code is in a single file Separated SQL SQL command are stored into XML file strings.xml and recalled when needed. Code distributed among two (potentially more) files

29 Reading Data from the Database SQLite Overview Implementation Create an SQL statement that describes the data that you need to retrieve. Execute that statement against the database. Map the resulting SQL data into data structures that the language you re working in can understand.

30 SQLite Overview Implementation Better approach Android offers slightly better approach custom cursors. Coursor It is a class encapsulating a query results. Query returns a simple cursor, while custom cursor provides (in addition) methods dealing with specific structure of the data

31 SQLite Overview Implementation

32 Overview Methods to implement URI like SQL 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

33 Content Provider Overview Overview Methods to implement URI like SQL What is Content Provider It is a mechanism enabling data sharing across applications. In general reading from other application is not allowed. Both reader and writer (producer/consumer) uses an API to provide or access data

34 Nine steps to success Outline Overview Methods to implement URI like SQL 1 Extend the ContentProvider class. 2 Define the CONTENT URI for your content provider. 3 Create the data storage for your content. 4 Create the column names for communication with clients. 5 Define the process by which binary data is returned to the client. 6 Declare public static Strings that clients use to specify columns. 7 Implement the CRUD methods of a Cursor to return to the client. 8 Update the AndroidManifest.xml file to declare your < provider >. 9 Define MIME types for any new data types.

35 Overview Methods to implement URI like SQL oncreate This method is called during the content provider s startup. Any code you want to run just once, such as making a database connection, should reside in this method. gettype This method, when given a URI, returns the MIME type of the data that this content provider provides at that URI. The URI comes from the client application interested in accessing the data.

36 Overview Methods to implement URI like SQL insert/create This method is called when the client code wishes to insert data into the database your content provider is serving. Normally, the implementation for this method will either directly or indirectly result in a database insert operation. query/read This method is called whenever a client wishes to read data from the content provider s database. It is normally called through ContentProvider s managedquery method. Normally, here you retrieve data using a SQL SELECT statement and return a cursor containing the requested data.

37 Overview Methods to implement URI like SQL update This method is called when a client wishes to update one or more rows in the ContentProvider s database. It translates to a SQL UPDATE statement. delete This method is called when a client wishes to delete one or more rows in the ContentProvider s database. It translates to a SQL DELETE statement.

38 URI Outline Overview Methods to implement URI like SQL where: content://authority/path/id content:// is the standard required prefix. authority is the name of the provider. Using your fully qualified package name is recommended to prevent name collisions. path is a virtual directory within the provider that identifies the kind of data being requested. id is the primary key of a specific record being requested. To request all records of a particular type, omit this and the trailing slash.

39 Overview Methods to implement URI like SQL Default content provided by Android content://browser content://contacts content://media content://settings

40 Overview Methods to implement URI like SQL

41 Internal storage External storage 1 Overview 2 3 SQLite Overview Implementation 4 Overview Methods to implement URI like SQL 5 Internal storage External storage

42 Storage types Outline Internal storage External storage Internal storage It s always available. No special permission required Files saved here are accessible by only your app by default. When the user uninstalls your app, the system removes all your app s files from internal storage. External storage It s not always available (e.g. removed USB storage or SD card) It s world-readable, so files saved here may be read outside of your control. When the user uninstalls your app, the system removes your app s files only from getexternalfilesdir().

43 Which one should I choose? Internal storage External storage Internal storage Internal storage is best when you want to be sure that neither the user nor other apps can access your files. External storage External storage is the best place for files that don t require access restrictions and for files that you want to share with other apps or allow the user to access with a computer.

44 Storage and App location Internal storage External storage App installation Although apps are installed onto the internal storage by default, you can specify the android:installlocation attribute in your manifest so your app may be installed on external storage. Users appreciate this option when the APK size is very large and they have an external storage space that s larger than the internal storage.

45 Required permissions for external Internal storage External storage 1 <uses p e r m i s s i o n a n d r o i d : name= a n d r o i d. p e r m i s s i o n. READ EXTERNAL STORAGE /> 1 <uses p e r m i s s i o n a n d r o i d : name= a n d r o i d. p e r m i s s i o n. WRITE EXTERNAL STORAGE /> Note You need only one of the above because WRITE_EXTERNAL_STORAGE implicitly gives you a READ permission.

46 Internal Storage Outline Internal storage External storage Your app s internal storage directory is specified by your app s package name in a special location of the Android file system. Another app can read your internal files if you set the file mode to be readable but Other apps cannot browse your internal directories and do not have read or write access unless you explicitly set the files to be readable or writable. If you use MODE_PRIVATE for your files on the internal storage, they are never accessible to other apps.

47 Create a file Outline Internal storage External storage 1 F i l e f i l e = new F i l e ( c o n t e x t. g e t F i l e s D i r ( ), f i l e n a m e ) ; Figure: Create empty file

48 Create a file Outline Internal storage External storage 1 S t r i n g f i l e n a m e = m y f i l e ; 2 S t r i n g s t r i n g = H e l l o w o r l d! ; 3 F i l e O u t p u t S t r e a m outputstream ; 4 t r y { 5 outputstream = o p e n F i l e O u t p u t ( f i l e n a m e, Context. MODE PRIVATE) ; 6 outputstream. w r i t e ( s t r i n g. g e t B y t e s ( ) ) ; 7 outputstream. c l o s e ( ) ; 8 } c a t c h ( E x c e p t i o n e ) { 9 e. p r i n t S t a c k T r a c e ( ) ; 10 } Figure: Alternatively, you can write to a file in your internal directory using a stream.

49 Create a file Outline Internal storage External storage 1 p u b l i c F i l e gettempfile ( Context c o n t e x t, S t r i n g u r l ) { 2 F i l e f i l e ; 3 t r y { 4 S t r i n g f i l e N a m e = U r i. p a r s e ( u r l ). getlastpathsegment ( ) ; 5 f i l e = F i l e. c r e a t e T e m p F i l e ( filename, n u l l, c o n t e x t. g e t C a c h e D i r ( ) ) ; 6 c a t c h ( I O E x c e p t i o n e ) { 7 // E r r o r w h i l e c r e a t i n g f i l e 8 } 9 r e t u r n f i l e ; 10 } Figure: Create a temporary file e.g, to cache some data

50 External storage Outline Internal storage External storage Because the external storage may be unavailable such as when the user has mounted the storage to a PC or has removed the SD card that provides the external storage you should always verify that the volume is available before accessing it. You can query the external storage state

51 Storage state Outline Internal storage External storage Checks if external storage is available to at least read 1 p u b l i c b o o l e a n i s E x t e r n a l S t o r a g e R e a d a b l e ( ) { 2 S t r i n g s t a t e = Environment. g e t E x t e r n a l S t o r a g e S t a t e ( ) ; 3 i f ( Environment.MEDIA MOUNTED. e q u a l s ( s t a t e ) 4 Environment. MEDIA MOUNTED READ ONLY. e q u a l s ( s t a t e ) ) { 5 r e t u r n t r u e ; 6 } 7 r e t u r n f a l s e ; 8 }

52 Storage state Outline Internal storage External storage Checks if external storage is available for read and write 1 p u b l i c b o o l e a n i s E x t e r n a l S t o r a g e W r i t a b l e ( ) { 2 S t r i n g s t a t e = Environment. g e t E x t e r n a l S t o r a g e S t a t e ( ) ; 3 i f ( Environment.MEDIA MOUNTED. e q u a l s ( s t a t e ) ) { 4 r e t u r n t r u e ; 5 } 6 r e t u r n f a l s e ; 7 }

53 Internal storage External storage File management in exernal storage Public files Files that should be freely available to other apps and to the user. When the user uninstalls your app, these files should remain available to the user. photos downloaded files Private files Files that rightfully belong to your app and should be deleted with the app. These files are accessible by the user and other apps but they are files that don t provide value to the user outside your app. additional resources temporary media files

54 Query free space Outline Internal storage External storage Query If you know ahead of time how much data you re saving, you can find out whether sufficient space is available without causing an IOException by calling getfreespace() or gettotalspace() Warning The system does not guarantee that you can write as many bytes as are indicated by getfreespace().

55 Internal storage External storage

Spring Lecture 5 Lecturer: Omid Jafarinezhad

Spring Lecture 5 Lecturer: Omid Jafarinezhad Mobile Programming Sharif University of Technology Spring 2016 - Lecture 5 Lecturer: Omid Jafarinezhad Storage Options Android provides several options for you to save persistent application data. The

More information

Content Provider. Introduction 01/03/2016. Session objectives. Content providers. Android programming course. Introduction. Built-in Content Provider

Content Provider. Introduction 01/03/2016. Session objectives. Content providers. Android programming course. Introduction. Built-in Content Provider Android programming course Session objectives Introduction Built-in Custom By Võ Văn Hải Faculty of Information Technologies 2 Content providers Introduction Content providers manage access to a structured

More information

CSCU9YH: Development with Android

CSCU9YH: Development with Android : Development with Android Computing Science and Mathematics University of Stirling Data Storage and Exchange 1 Preferences: Data Storage Options a lightweight mechanism to store and retrieve keyvalue

More information

Mobile and Ubiquitous Computing: Android Programming (part 4)

Mobile and Ubiquitous Computing: Android Programming (part 4) Mobile and Ubiquitous Computing: Android Programming (part 4) Master studies, Winter 2015/2016 Dr Veljko Pejović Veljko.Pejovic@fri.uni-lj.si Examples from: Mobile and Ubiquitous Computing Jo Vermeulen,

More information

Android: Data Storage

Android: Data Storage Android: Data Storage F. Mallet Frederic.Mallet@unice.fr Université Nice Sophia Antipolis Outline Data Storage Shared Preferences Internal Storage External Storage SQLite Databases Network Connection F.

More information

CS371m - Mobile Computing. Persistence

CS371m - Mobile Computing. Persistence CS371m - Mobile Computing Persistence Storing Data Multiple options for storing data associated with apps Shared Preferences Internal Storage device memory External Storage SQLite Database Network Connection

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 3 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 2 - recap Views and Layouts Events Basic application components Activities Intents 9/22/2017

More information

The Basis of Data. Steven R. Bagley

The Basis of Data. Steven R. Bagley The Basis of Data Steven R. Bagley So far How to create a UI View defined in XML Java-based Activity as the Controller Services Long running processes Intents used to send messages between things asynchronously

More information

Automatically persisted among application sessions

Automatically persisted among application sessions STORAGE OPTIONS Storage options SharedPreference Small amount of data, as Key-value pairs Private to an Activity or Shared among Activities Internal storage Small to medium amount of data Private to the

More information

SAVING SIMPLE APPLICATION DATA

SAVING SIMPLE APPLICATION DATA 1 DATA PERSISTENCE OBJECTIVES In this chapter, you will learn how to persist data in your Android applications. Persisting data is an important topic in application development, as users typically expect

More information

Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza. Data persistence

Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza. Data persistence Eng. Jaffer M. El-Agha Android Programing Discussion Islamic University of Gaza Data persistence Shared preferences A method to store primitive data in android as key-value pairs, these saved data will

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 3 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 2 - recap Views and Layouts Events Basic application components Activities Intents 9/15/2014

More information

SQLite Database. References. Overview. Structured Databases

SQLite Database. References. Overview. Structured Databases SQLite Database References Android Developers Article https://developer.android.com/training/basics/data-storage/databases.html Android SQLite Package Reference https://developer.android.com/reference/android/database/sqlite/package-summary.html

More information

CS371m - Mobile Computing. Persistence - SQLite

CS371m - Mobile Computing. Persistence - SQLite CS371m - Mobile Computing Persistence - SQLite In case you have not taken 347: Data Management or worked with databases as part of a job, internship, or project: 2 Databases RDBMS relational data base

More information

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project. XML Tutorial XML stands for extensible Markup Language. XML is a markup language much like HTML used to describe data. XML tags are not predefined in XML. We should define our own Tags. Xml is well readable

More information

SharedPreferences Internal Storage External Storage SQLite databases

SharedPreferences Internal Storage External Storage SQLite databases SharedPreferences Internal Storage External Storage SQLite databases Use when you want to store small amounts of primitive data A persistent map that holds key-value pairs of simple data types Automatically

More information

Lecture 2 Android SDK

Lecture 2 Android SDK Lecture 2 Android SDK This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/ or send a

More information

CS378 -Mobile Computing. Persistence

CS378 -Mobile Computing. Persistence CS378 -Mobile Computing Persistence Saving State We have already seen saving app state into a Bundle on orientation changes or when an app is killed to reclaim resources but may be recreated later 2 Storing

More information

Required Core Java for Android application development

Required Core Java for Android application development Required Core Java for Android application development Introduction to Java Datatypes primitive data types non-primitive data types Variable declaration Operators Control flow statements Arrays and Enhanced

More information

CS 403X Mobile and Ubiquitous Computing Lecture 5: Web Services, Broadcast Receivers, Tracking Location, SQLite Databases Emmanuel Agu

CS 403X Mobile and Ubiquitous Computing Lecture 5: Web Services, Broadcast Receivers, Tracking Location, SQLite Databases Emmanuel Agu CS 403X Mobile and Ubiquitous Computing Lecture 5: Web Services, Broadcast Receivers, Tracking Location, SQLite Databases Emmanuel Agu Web Services What are Web Services? Means to call a remote method

More information

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015 Android System Architecture Android Application Fundamentals Applications in Android All source code, resources, and data are compiled into a single archive file. The file uses the.apk suffix and is used

More information

SharedPreference. <map> <int name="access_count" value="3" /> </map>

SharedPreference. <map> <int name=access_count value=3 /> </map> 1 Android Data Storage Options Android provides several data storage options for you to save persistent application data depends on your specific needs: private/public, small/large datasets :- Internal

More information

Mobile Application Development Android

Mobile Application Development Android Mobile Application Development Android Lecture 3 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 2 -recap Views and Layouts Events Basic application components Activities Intents BroadcastReceivers

More information

Configuring the Android Manifest File

Configuring the Android Manifest File Configuring the Android Manifest File Author : userone What You ll Learn in This Hour:. Exploring the Android manifest file. Configuring basic application settings. Defining activities. Managing application

More information

How-to s and presentations. Be prepared to demo them in class. https://sites.google.com/site/androidhowto/presentati ons

How-to s and presentations. Be prepared to demo them in class. https://sites.google.com/site/androidhowto/presentati ons Upcoming Assignments Readings: Chapter 6 by today Lab 3 due today (complete survey) Lab 4 will be available Friday (due February 5) Friday Quiz in Blackboard 2:10-3pm (Furlough) Vertical Prototype due

More information

MarkLogic Server. Information Studio Developer s Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

MarkLogic Server. Information Studio Developer s Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved. Information Studio Developer s Guide 1 MarkLogic 8 February, 2015 Last Revised: 8.0-1, February, 2015 Copyright 2015 MarkLogic Corporation. All rights reserved. Table of Contents Table of Contents Information

More information

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism ANDROID TRAINING COURSE CONTENT SECTION 1 : INTRODUCTION Android What it is? History of Android Importance of Java language for Android Apps Other mobile OS-es Android Versions & different development

More information

Minds-on: Android. Session 1

Minds-on: Android. Session 1 Minds-on: Android Session 1 Paulo Baltarejo Sousa Instituto Superior de Engenharia do Porto 2016 Outline Mobile devices Android OS Android architecture Android Studio Practice 1 / 33 2 / 33 Mobile devices

More information

CS371m - Mobile Computing. Content Providers And Content Resolvers

CS371m - Mobile Computing. Content Providers And Content Resolvers CS371m - Mobile Computing Content Providers And Content Resolvers Content Providers One of the four primary application components: activities content providers / content resolvers services broadcast receivers

More information

SQLite. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases. What is a Database Server. Advantages of SQLite

SQLite. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases. What is a Database Server. Advantages of SQLite SQLite 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases Dr Dimitris C. Dracopoulos SQLite is a tiny yet powerful database engine. Besides Android, it can be found in: Apple iphone

More information

CS378 -Mobile Computing. Persistence -SQLite

CS378 -Mobile Computing. Persistence -SQLite CS378 -Mobile Computing Persistence -SQLite Databases RDBMS relational data base management system Relational databases introduced by E. F. Codd Turing Award Winner Relational Database data stored in tables

More information

Android Security Research: Crypto Wallet Local Storage Attack

Android Security Research: Crypto Wallet Local Storage Attack Android Security Research: Crypto Wallet Local Storage Attack Author: Loc Phan Van, Viet Nguyen Quoc 22 Feb 2019 1. Background During our mobile security pen testing, we have found a very interesting attack

More information

07. Data Storage

07. Data Storage 07. Data Storage 22.03.2018 1 Agenda Data storage options How to store data in key-value pairs How to store structured data in a relational database 2 Data Storage Options Shared Preferences Store private

More information

Syllabus- Java + Android. Java Fundamentals

Syllabus- Java + Android. Java Fundamentals Introducing the Java Technology Syllabus- Java + Android Java Fundamentals Key features of the technology and the advantages of using Java Using an Integrated Development Environment (IDE) Introducing

More information

Android Application Development using Kotlin

Android Application Development using Kotlin Android Application Development using Kotlin 1. Introduction to Kotlin a. Kotlin History b. Kotlin Advantages c. How Kotlin Program Work? d. Kotlin software Prerequisites i. Installing Java JDK and JRE

More information

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu

CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu CS 528 Mobile and Ubiquitous Computing Lecture 4a: Fragments, Camera Emmanuel Agu Fragments Recall: Fragments Sub-components of an Activity (screen) An activity can contain multiple fragments, organized

More information

Android writing files to the external storage device

Android writing files to the external storage device Android writing files to the external storage device The external storage area is what Android knows as the SD card. There is a virtual SD card within the Android file system although this may be of size

More information

Android Application Development 101. Jason Chen Google I/O 2008

Android Application Development 101. Jason Chen Google I/O 2008 Android Application Development 101 Jason Chen Google I/O 2008 Goal Get you an idea of how to start developing Android applications Introduce major Android application concepts Provide pointers for where

More information

Android Camera. Alexander Nelson October 6, University of Arkansas - Department of Computer Science and Computer Engineering

Android Camera. Alexander Nelson October 6, University of Arkansas - Department of Computer Science and Computer Engineering Android Camera Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Why use the camera? Why not? Translate Call Learn Capture How to use the

More information

Android Application Development Course 28 Contact Hours

Android Application Development Course 28 Contact Hours Android Application Development Course 28 Contact Hours Course Overview This course that provides the required knowledge and skills to design and build a complete Androidâ application. It delivers an extensive

More information

Computer Science Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 26, 2017

Computer Science Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 26, 2017 Computer Science Large Practical: Storage, Settings and Layouts Stephen Gilmore School of Informatics October 26, 2017 Contents 1. Storing information 2. Kotlin compilation 3. Settings 4. Layouts 1 Storing

More information

Setting Access Controls on Files, Folders, Shares, and Other System Objects in Windows 2000

Setting Access Controls on Files, Folders, Shares, and Other System Objects in Windows 2000 Setting Access Controls on Files, Folders, Shares, and Other System Objects in Windows 2000 Define and set DAC policy (define group membership, set default DAC attributes, set DAC on files systems) Modify

More information

Software Engineering Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 27, 2017

Software Engineering Large Practical: Storage, Settings and Layouts. Stephen Gilmore School of Informatics October 27, 2017 Software Engineering Large Practical: Storage, Settings and Layouts Stephen Gilmore School of Informatics October 27, 2017 Contents 1. Storing information 2. Settings 3. Layouts 1 Storing information Storage

More information

Android Programming - Jelly Bean

Android Programming - Jelly Bean 1800 ULEARN (853 276) www.ddls.com.au Android Programming - Jelly Bean Length 5 days Price $4235.00 (inc GST) Overview This intensive, hands-on five-day course teaches programmers how to develop activities,

More information

Software Engineering Large Practical: Preferences, storage, and testing

Software Engineering Large Practical: Preferences, storage, and testing Software Engineering Large Practical: Preferences, storage, and testing Stephen Gilmore (Stephen.Gilmore@ed.ac.uk) School of Informatics November 9, 2016 Contents A simple counter activity Preferences

More information

MOBILE APPLICATIONS PROGRAMMING

MOBILE APPLICATIONS PROGRAMMING Data Storage 23.12.2015 MOBILE APPLICATIONS PROGRAMMING Krzysztof Pawłowski Polsko-Japońska Akademia Technik Komputerowych STORAGE OPTIONS Shared Preferences SQLite Database Internal Storage External Storage

More information

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore Android App Development Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore Mobile devices (e.g., smartphone, tablet PCs, etc.) are increasingly becoming an essential part of human life

More information

Android Programming Lecture 16 11/4/2011

Android Programming Lecture 16 11/4/2011 Android Programming Lecture 16 11/4/2011 New Assignment Discuss New Assignment for CityApp GetGPS Search Web Service Parse List Coordinates Questions from last class It does not appear that SQLite, in

More information

COLLEGE OF ENGINEERING, NASHIK-4

COLLEGE OF ENGINEERING, NASHIK-4 Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4 DEPARTMENT OF COMPUTER ENGINEERING 1) What is Android? Important Android Questions It is an open-sourced operating system that is used primarily

More information

(Refer Slide Time: 1:12)

(Refer Slide Time: 1:12) Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Lecture 06 Android Studio Setup Hello, today s lecture is your first lecture to watch android development.

More information

Learn about Android Content Providers and SQLite

Learn about Android Content Providers and SQLite Tampa Bay Android Developers Group Learn about Android Content Providers and SQLite Scott A. Thisse March 20, 2012 Learn about Android Content Providers and SQLite What are they? How are they defined?

More information

Programming Concepts and Skills. Creating an Android Project

Programming Concepts and Skills. Creating an Android Project Programming Concepts and Skills Creating an Android Project Getting Started An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy

More information

CORE JAVA& ANDROID SYLLABUS

CORE JAVA& ANDROID SYLLABUS CORE JAVA& ANDROID SYLLABUS AAvhdvchdvchdvhdh CORE JAVA Assignment s Introduction Programming language Types and Paradigms Why Java? Flavors of Java Java Designing Goal Role of Java Programmer in Industry

More information

Archiving Full Resolution Images

Archiving Full Resolution Images Archiving Full Resolution Images Archival or full resolution files are very large and are either uncompressed or minimally compressed. This tutorial explains how to use CONTENTdm and the Project Client

More information

File systems, databases, cloud storage

File systems, databases, cloud storage File systems, databases, cloud storage file: a sequence of bytes stored on a computer content is arbitrary (just bytes); any structure is imposed by the creator of the file, not by the operating system

More information

All-In-One-Designer SEO Handbook

All-In-One-Designer SEO Handbook All-In-One-Designer SEO Handbook Introduction To increase the visibility of the e-store to potential buyers, there are some techniques that a website admin can implement through the admin panel to enhance

More information

Android File & Storage

Android File & Storage Files Lecture 9 Android File & Storage Android can read/write files from two locations: Internal (built into the device) and external (an SD card or other drive attached to device) storage Both are persistent

More information

Orientation & Localization

Orientation & Localization Orientation & Localization Overview Lecture: Open Up Your My Pet App Handling Rotations Serializable Landscape Layouts Localization Alert Dialogs 1 Handling Rotations When the device is rotated, the device

More information

DSS User Guide. End User Guide. - i -

DSS User Guide. End User Guide. - i - DSS User Guide End User Guide - i - DSS User Guide Table of Contents End User Guide... 1 Table of Contents... 2 Part 1: Getting Started... 1 How to Log in to the Web Portal... 1 How to Manage Account Settings...

More information

DEVELOPMENT OF PUBLIC FACILITY AND HOUSEHOLD LOCATOR TOOL USING MOBILE GIS AND ANDROID TECHNOLOGY

DEVELOPMENT OF PUBLIC FACILITY AND HOUSEHOLD LOCATOR TOOL USING MOBILE GIS AND ANDROID TECHNOLOGY DEVELOPMENT OF PUBLIC FACILITY AND HOUSEHOLD LOCATOR TOOL USING MOBILE GIS AND ANDROID TECHNOLOGY Engr. Alexander T. Demetillo, Engr. Michelle V. Japitana, Sonny S. Norca CLAIMS-GIS Project, College of

More information

Mobile Programming Lecture 10. ContentProviders

Mobile Programming Lecture 10. ContentProviders Mobile Programming Lecture 10 ContentProviders Lecture 9 Review In creating a bound service, why would you choose to use a Messenger over extending Binder? What are the differences between using GPS provider

More information

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5 Objective Questions BCA Part III page 1 of 5 1. Java is purely object oriented and provides - a. Abstraction, inheritance b. Encapsulation, polymorphism c. Abstraction, polymorphism d. All of the above

More information

More on Objects in JAVA TM

More on Objects in JAVA TM More on Objects in JAVA TM Inheritance : Definition: A subclass is a class that extends another class. A subclass inherits state and behavior from all of its ancestors. The term superclass refers to a

More information

Lab 1 - Setting up the User s Profile UI

Lab 1 - Setting up the User s Profile UI Lab 1 - Setting up the User s Profile UI Getting started This is the first in a series of labs that allow you to develop the MyRuns App. The goal of the app is to capture and display (using maps) walks

More information

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015

Developing Android Applications Introduction to Software Engineering Fall Updated 1st November 2015 Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional

More information

Teiid Designer User Guide 7.5.0

Teiid Designer User Guide 7.5.0 Teiid Designer User Guide 1 7.5.0 1. Introduction... 1 1.1. What is Teiid Designer?... 1 1.2. Why Use Teiid Designer?... 2 1.3. Metadata Overview... 2 1.3.1. What is Metadata... 2 1.3.2. Editing Metadata

More information

ITP 342 Mobile App Development. Data Persistence

ITP 342 Mobile App Development. Data Persistence ITP 342 Mobile App Development Data Persistence Persistent Storage Want our app to save its data to persistent storage Any form of nonvolatile storage that survives a restart of the device Want a user

More information

CS378 -Mobile Computing. Intents

CS378 -Mobile Computing. Intents CS378 -Mobile Computing Intents Intents Allow us to use applications and components that are part of Android System and allow other applications to use the components of the applications we create Examples

More information

Roxen Content Provider

Roxen Content Provider Roxen Content Provider Generation 3 Templates Purpose This workbook is designed to provide a training and reference tool for placing University of Alaska information on the World Wide Web (WWW) using the

More information

Caja File Manager. Desktop User Guide

Caja File Manager. Desktop User Guide Caja File Manager Desktop User Guide Desktop User Guide» Working with Files This chapter describes how to use the Caja file manager. Introduction Spatial Mode Browser Mode Opening Files Searching For Files

More information

Andorid Storage Options

Andorid Storage Options CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing File Storage, Shared Preferences, and SQLite Database Reference Android Programming Concepts, by Trish Cornez and Richard Cornez, pubslihed

More information

Firebase Realtime Database. Landon Cox April 6, 2017

Firebase Realtime Database. Landon Cox April 6, 2017 Firebase Realtime Database Landon Cox April 6, 2017 Databases so far SQLite (store quiz progress locally) User starts app Check database to see where user was Say you want info about your friends quizzes

More information

SHWETANK KUMAR GUPTA Only For Education Purpose

SHWETANK KUMAR GUPTA Only For Education Purpose Introduction Android: INTERVIEW QUESTION AND ANSWER Android is an operating system for mobile devices that includes middleware and key applications, and uses a modified version of the Linux kernel. It

More information

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

Building MyFirstApp Android Application Step by Step. Sang Shin   Learn with Passion! Building MyFirstApp Android Application Step by Step. Sang Shin www.javapassion.com Learn with Passion! 1 Disclaimer Portions of this presentation are modifications based on work created and shared by

More information

Android SQLite Essentials

Android SQLite Essentials Android SQLite Essentials Table of Contents Android SQLite Essentials Credits About the Authors About the Reviewers www.packtpub.com Support files, ebooks, discount offers and more Why Subscribe? Free

More information

Lab 4 In class Hands-on Android Debugging Tutorial

Lab 4 In class Hands-on Android Debugging Tutorial Lab 4 In class Hands-on Android Debugging Tutorial Submit lab 4 as PDF with your feedback and list each major step in this tutorial with screen shots documenting your work, i.e., document each listed step.

More information

AND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam.

AND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam. Android Programming This Android Training Course will help you build your first working application quick-quick. You ll learn hands-on how to structure your app, design interfaces, create a database, make

More information

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY: PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY: K.VENU 10JE1A0555 Venu0555@gmail.com B.POTHURAJU 10JE1A0428 eswr10je1a0410@gmail.com ABSTRACT early prototypes, basic building blocks of an android

More information

Android Programming (5 Days)

Android Programming (5 Days) www.peaklearningllc.com Android Programming (5 Days) Course Description Android is an open source platform for mobile computing. Applications are developed using familiar Java and Eclipse tools. This Android

More information

Page 1

Page 1 Java 1. Core java a. Core Java Programming Introduction of Java Introduction to Java; features of Java Comparison with C and C++ Download and install JDK/JRE (Environment variables set up) The JDK Directory

More information

MC Android Programming

MC Android Programming MC1921 - Android Programming Duration: 5 days Course Price: $3,395 Course Description Android is an open source platform for mobile computing. Applications are developed using familiar Java and Eclipse

More information

LTBP INDUSTRIAL TRAINING INSTITUTE

LTBP INDUSTRIAL TRAINING INSTITUTE Java SE Introduction to Java JDK JRE Discussion of Java features and OOPS Concepts Installation of Netbeans IDE Datatypes primitive data types non-primitive data types Variable declaration Operators Control

More information

Introduction To Android

Introduction To Android Introduction To Android Mobile Technologies Symbian OS ios BlackBerry OS Windows Android Introduction to Android Android is an operating system for mobile devices such as smart phones and tablet computers.

More information

Murach s Beginning Java with Eclipse

Murach s Beginning Java with Eclipse Murach s Beginning Java with Eclipse Introduction xv Section 1 Get started right Chapter 1 An introduction to Java programming 3 Chapter 2 How to start writing Java code 33 Chapter 3 How to use classes

More information

Android Validating Xml Against Schema Java Example

Android Validating Xml Against Schema Java Example Android Validating Xml Against Schema Java Example I am working with XML and JAXB as I am unmarshalling and marshalling the XML into Java objects and vice versa. Now I am trying to validate our XML against.

More information

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio Getting Started with Android Development Zebra Android Link-OS SDK Android Studio Overview This Application Note describes the end-to-end process of designing, packaging, deploying and running an Android

More information

Schema_reference Unable Load Schema Target Namespace

Schema_reference Unable Load Schema Target Namespace Schema_reference Unable Load Schema Target Namespace (Warning) try.xsd:9:56: schema_reference.4: Failed to read schema document Try this XSD as a test, it loads directly from the URL for xmldsig-core-schema.xsd

More information

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Java for Programmers Course (equivalent to SL 275) 36 Contact Hours Course Overview This course teaches programmers the skills necessary to create Java programming system applications and satisfies the

More information

Static analysis for quality mobile applications

Static analysis for quality mobile applications Static analysis for quality mobile applications Julia Perdigueiro MOTODEV Studio for Android Project Manager Instituto de Pesquisas Eldorado Eric Cloninger Product Line Manager Motorola Mobility Life.

More information

Quick Start Guide. CodeGenerator v1.5.0

Quick Start Guide. CodeGenerator v1.5.0 Contents Revision History... 2 Summary... 3 How It Works... 4 Database Schema... 4 Customization... 4 APIs... 4 Annotations... 4 Attributes... 5 Transformation & Output... 5 Creating a Project... 6 General

More information

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings. Hello World Lab Objectives: Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.xml What to Turn in: The lab evaluation

More information

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP) Android Syllabus Pre-requisite: C, C++, Java Programming SQL & PL SQL Chapter 1: Introduction to Android Introduction to android operating system History of android operating system Features of Android

More information

Complete Java Contents

Complete Java Contents Complete Java Contents Duration: 60 Hours (2.5 Months) Core Java (Duration: 25 Hours (1 Month)) Java Introduction Java Versions Java Features Downloading and Installing Java Setup Java Environment Developing

More information

Baan OpenWorld 2.2. Installation and Configuration Guide for Adapter

Baan OpenWorld 2.2. Installation and Configuration Guide for Adapter Baan OpenWorld 2.2 Installation and Configuration Guide for Adapter A publication of: Baan Development B.V. P.O.Box 143 3770 AC Barneveld The Netherlands Printed in the Netherlands Baan Development B.V.

More information

TTerm Connect Installation Guide

TTerm Connect Installation Guide Host Connectivity. Any Host, Any Device. TTerm Connect Installation Guide What is TTerm Connect? TTerm Connect is Turbosoft s web based terminal emulator. Built on common web technologies such as HTML5,

More information

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features

More information

8 MANAGING SHARED FOLDERS & DATA

8 MANAGING SHARED FOLDERS & DATA MANAGING SHARED FOLDERS & DATA STORAGE.1 Introduction to Windows XP File Structure.1.1 File.1.2 Folder.1.3 Drives.2 Windows XP files and folders Sharing.2.1 Simple File Sharing.2.2 Levels of access to

More information

A-2 Administration and Security Glossary

A-2 Administration and Security Glossary Appendix A Glossary This glossary defines some of the Process Commander terms system and background processing, authentication and authorization, process management, organization structure, and user interface

More information

Java Input/Output. 11 April 2013 OSU CSE 1

Java Input/Output. 11 April 2013 OSU CSE 1 Java Input/Output 11 April 2013 OSU CSE 1 Overview The Java I/O (Input/Output) package java.io contains a group of interfaces and classes similar to the OSU CSE components SimpleReader and SimpleWriter

More information

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile

Proje D2K. CMM (Capability Maturity Model) level Project Standard:- Corporate Trainer s Profile D2K Corporate Trainer s Profile Corporate Trainers are having the experience of 4 to 12 years in development, working with TOP CMM level 5 comapnies (Project Leader /Project Manager ) qualified from NIT/IIT/IIM

More information