0% found this document useful (0 votes)
14 views45 pages

Lecture # 1 MAD Intro

The document discusses a mobile application development course. It covers topics like the course structure, purpose, lectures, traditional vs smart phones, Java Virtual Machine, programming environment, variables, arrays, maps, conditional and loop statements, classes and objects. It also discusses mobile hardware and software including iOS, Android and Windows platforms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views45 pages

Lecture # 1 MAD Intro

The document discusses a mobile application development course. It covers topics like the course structure, purpose, lectures, traditional vs smart phones, Java Virtual Machine, programming environment, variables, arrays, maps, conditional and loop statements, classes and objects. It also discusses mobile hardware and software including iOS, Android and Windows platforms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

Mobile Application

Development
LECTURE # 1
The Course
Course Code: CS4-Morning
Course Title: Mobile Application Development
Instructor: MUHAMMAD AWAIS
Semester: 4
Duration: 16 Weeks
Grading
Following is the division of marks:

Assignments and Quizzes 20


Project 10
Mid-Term Exam 30
Final Exams. 40

◦ Marks division might change during the semester


Purpose of Course
Understand the whole mobile computing paradigm.
Develop mobile applications for the Android OS that use basic and
advanced phone features
Deploy applications to the Android marketplace for distribution
To understand Android Operating System with reference to Mobile
Application Development.
To understand about different components of Android Application.
To understand Data persistency.
To understand about User Interface.
Cont….
After the completion of the course, students are expected to have:
Ability to apply general programming knowledge in the field of
developing mobile applications.
Understanding of the specific requirements, possibilities and
challenges when developing for a mobile context.
Understanding of the interactions between user interface and
underlying application infrastructure.
Have developed practical skills and knowledge to construct software
for a mobile application
Have the ability to reflect over possibilities and demands in
collaborative software development.
Traditional Phones

• Pick up the Phone

• Start Talking

• When finished talking, Hang Up!


Traditional Mobile Phones

• Pick up the Phone

• Start Talking

• When finished talking, Hang Up!

• Send and Receive Messages

• A few games
Featured Mobile Phones

• Calls, SMS, Games

• Camera

• Use Internet on Mobile Phone

• Check Emails
Smart Phones
• Calls, SMS, Games
• Camera
• Use Internet on Mobile Phone
• Check Emails
• Enjoy Music
• Watch Videos
• Use Social Networks
• Maps
• Read Books
• Do almost everything that can be done on a Computer.
LECTURE CONTENTS
•Introduction with JVM and programming environment
•Variables, arrays & maps
•If Statements
•Loops
•Classes and objects
What is JVM
•JVM (Java Virtual Machine) is an abstract machine. It is a specification
that provides runtime environment in which java bytecode can be
executed.
•Virtual machine is a software simulation of machine which can perform
operations similar to physical machine.
•JVMs are available for many hardware and software platforms (i.e. JVM
is platform dependent).
•Virtual machine is not physically present.
•E.g calculator
What it Does
•Loads code
•Verifies code
•Exécutes code
•Provides runtime environment
JVM Architecture
Programming Environment
•“A Programming Environment is the collection of tools used in the
development of software.”
•In a general sense, a programming environment combines hardware
and software that allows a developer to build applications.
•An Integrated Development Environment integrates common
development tools in single software environment.
•E.g for java programming IDE is Android Studio.
Variables
•Variables are containers for storing data values.
•E.g String, int, Float, Char, Boolean
•int num = 5;
•float myfloatnum = 5.9;
•char myletter = ‘D’;
•boolean mybool = true;
•String mytext = “Hello”;
Arrays
•Arrays are used to store multiple values in a single variable, instead of
declaring separate variables for each value.

•String cars[ ] = { “Corolla”, “City”, “Mehran”};


Maps
•In Java, Map Interface is present in java.util package represents a
mapping between a key and a value.
•A map contains unique keys.
•A map stores data in key value pair.
•E.g
•A map of managers and employees. Each manager (key) is associated
with a list of employees (value) he manages.
•A map of classes and students. Each class (key) is associated with a list
of students (value).
•Rollno-name 01 = Ali
Maps
Package to import
•import java.util.Map

•Syntax:
•public interface Map<k, v >
Map code example
public class test{
public static void main( String args[ ] ) Methods:
{
• Clear( );
Map map = new HashMap( ); • containsKey(Object) //boolean value
map.put( 1, “Ali” ); • containsValue(Object)//boolean
map.put( 2, “Ahmad” );
map.put( 3, “Ahasn” );
system.out.println(map);
}
}
Output: { 1=Ali, 2= Ahmad, 3=Ahsan}
If Statements
•Use the if statement to specify a block of java code to be executed if the
condition is true.
•E.g.

•if (20 > 18) {


System.out.println("20 is greater than 18");
}
Else statements
•Use the else statement to specify a block of java code to be executed if
the condition is false.
•E.g.
int time = 20;
if (time < 18) {
System.out.println("Good day."); }
else {
System.out.println("Good evening.");
}
Else-if
•Use the else-if statement to specify a new condition if the first
condition is false.
•E.g.
int time = 22;
if (time < 10) {
System.out.println("Good morning."); }
else if (time < 18) {
System.out.println("Good day."); }
else { System.out.println("Good evening."); }
For Loop
•When you know exactly how many times you want to loop through a
block of code, use the for loop.
•E.g.

for (int i = 0; i <= 10; i = i + 2) {


System.out.println(i);
}
Nested Loops
•It is also possible to place a loop inside another loop. This is called
a nested loop.
•The "inner loop" will be executed one time for each iteration of the
"outer loop“.E.g.
for (int i = 1; i <= 2; i++) { //Executes 2 times
System.out.println("Outer: " + i );
for (int j = 1; j <= 3; j++) {
System.out.println(" Inner: " + j ); // Executes 6 times (2 * 3)
}
}
While loop
•The While loop loops through a block of code as long as the specified
condition is true. E.g.
int i = 0;
while (i < 5)
{
System.out.println(i);
i++;
}
Do While loop
•This loop will execute the code block once, before checking if the
condition is true, then it will repeat the loop as long as the condition is
true. E.g.
int i = 0;
do {
System.out.println(i); i++;
}
while (i < 5);
Classes/Objects
•Java is an object-oriented programming language.

•Everything in Java is associated with classes and objects, along with its
attributes and methods.

•For example: in real life, a car is an object. The car has attributes, such
as weight and color, and methods, such as drive and brake.
Example
public class Main {
int x = 5;

public static void main(String[] args) {


Main myObj1 = new Main(); //multiple objects
Main myObj2 = new Main();
System.out.println(myObj1.x);
System.out.println(myObj2.x);
}
}
Mobile Hardware
 Primary camera W/WO flash.
 Secondary camera W/WO flash.
 Battery.
 Speakers.
 Microphones.
 And other components…
Mobile Software
An operating system which interact with mobile
hardware and user programs to perform
computation and manage hardware and software
resources. It also deals with the services of
mobility (connectivity, communication, mobility).
Mobile Software
Mobile Software | iOS
 Developed by Apple Inc.

 Initial Release: 2007

 Current Status: Present

 Written In: C, C++, Objective-C, Swift

 OS Family: Unix based

 Source Model: Closed


Mobile Software | Android
 Developed by Google

 Initial Release: 2008

 Current Status: Present

 Written In: JAVA

 OS Family: Linux based

 Source Model: Open


Mobile Software | Windows
 Developed by Microsoft

 Initial Release: 2010

 Current Status: Present

 Written In: C, C++

 OS Family: Microsoft Windows

 Source model: Closed


Why Develop for Mobile?

World’s Population
Is Around

7 Billion
Why Develop for Mobile?
Around

7 Billion

Mobile Users in World

Big reason to develop for Mobile


Why Develop for Mobile?
Mobile Phone Users (in millions)

121 111 105


859
154 China
202 India
U.S.
Russia
Indonesia
220 Brazil
Veitnam
Japan
Pakistan
238 Germany
279 752
Why Develop for Mobile?
Smart Phone usage

1 Billion +

Mobile Users
Smart Phone Users
6 Billion

Smart Phone market is Huge


Why Develop for Mobile?

1 Billion plus Mobile


Phones
+
Other Post-PC Devices
Which Platform to Develop for ?
Things to Consider

Market share
◦ No. of Users

Development environment
◦ Licensing

Ease of Development
◦ Programming Language

Freedom of Development
Why Develop for Mobile?
Mobile Application Development

iOS Android
Mobile Development
Apple Android
Language Objective C Java
License $99 / year $ 25 for Life Time
Open Source No Yes
Hardware Only Apple machines Any Machine
Publication Have to Pass Apple With Ease
Publication System

Multiple Devices No Yes


Support Only iOS Devices LG, Samsung, HTC etc.

Freedom of Not much Yes


Development

You might also like