Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 35

CS436 - Mobile

Application
Development
DR. USMAN KHAN DURRANI
PHD. RMIT UNIVERSITY – MELBOURNE AUSTRALIA

MASTERS OF IT – RMIT UNIVERSITY – MELBOURNE AUSTRALIA


Week 1a:
Introduction to
Java
C++ Vs Java - Differences
Comparison Index C++ Java
Java supports pointer
Platform-independent C++ is platform-dependent. Java is platform-independent. C++ supports  internally. However,
pointers you can't write the
Mainly used for C++ is mainly used for system Java is mainly used for . You can write a pointer program in
programming. application programming. It is
widely used in Windows-based, pointer program in java. It means java
web-based, enterprise, and C++. has restricted pointer
mobile applications.
support in java.

Compiler and C++ uses compiler Java uses both


Interpreter only. C++ is compiler and
Design Goal C++ was designed for systems Java was designed and created
and applications programming. as an interpreter for printing compiled and run interpreter. Java
It was an extension of the  systems but later extended as a using the compiler source code is
C programming language support network computing. It which converts converted into
. was designed to be easy to use
and accessible to a broader source code into bytecode at
audience. machine code so, C+ compilation time.
+ is platform The interpreter
dependent. executes this
bytecode at runtime
and produces output.
Goto C++ supports the goto Java doesn't support the goto
statement. statement. Java is interpreted
that is why it is
Multiple inheritance C++ supports multiple Java doesn't support multiple platform-
inheritance. inheritance through class. It can independent.
be achieved by using 
interfaces in java
. Call by Value and C++ supports both Java supports call by
Call by reference call by value and call value only. There is
by reference. no call by reference
Operator Overloading C++ supports  Java doesn't support operator in java.
operator overloading overloading
.

3
C++ Data Types

4
Java Data Types

5
C++ Operators

6
Java Operators

7
C++ vs Java Hello World

1.#include <iostream>   1.class Simple{  
2.using namespace std;   2.   public static void main(String args[])
3.int main() {   3. {  
4.   cout << "Hello C++ Programming";   4.     System.out.println("Hello Java");  
5.   return 0;   5.    }  
6.}   6.}  

8
Conditional Statement - Java
1./Java Program to demonstate the use of if statement.  
2.public class IfExample {  
3. public static void main(String[] args) {  
4.    //defining an 'age' variable  
5.    int age=20;  
6.    //checking the age  
7.    if(age>18){  
8.         System.out.print("Age is greater than 18");  
9.    }  
10. }  
11.}  

9
Loops in Java – For Loop
1.//Java Program to demonstrate the example of for loop  
2.//which prints table of 1  
3.public class ForExample {  
4. public static void main(String[] args) {  
5.     //Code of Java for loop  
6.     for(int i=1;i<=10;i++){  
7.         System.out.println(i);  
8.     }  
9. }  
10.}  
10
Loops in Java – While Loop
1.public class WhileExample {  
2. public static void main(String[] args) {  
3.     int i=1;  
4.     while(i<=10){  
5.         System.out.println(i);  
6.     i++;  
7.     }  
8. }  
9.}  
11
Classes and Objects in Java
1.class Student{  
2. //defining fields  
3. int id;//field or data member or instance variable  
4. String name;  
5. //creating main method inside the Student class  
6.  public static void main(String args[]){  
7.   //Creating an object or instance  
8.   Student s1=new Student();//creating an object of Student  
9.   //Printing values of the object  
10.   System.out.println(s1.id);//accessing member through reference variable  
11.   System.out.println(s1.name);  
12.  }  
13.}  

12
Interested to learn Java
more…
https://www.javatpoint.com/java-tutorial
Learn and Practice at the
same time

13
Week 1b:
Introducing
Mobile Systems
Week 1a – Mobile Computing
The mobile web and the normal web
should be the same web
The web is accessed using desktop
computers, portables, ultra-books, pads,
tablets, smartphones and cell phones
The websites you develop need to be
accessible to all these devices

15
The Mobile Ecosystem
The mobile ecosystem consists of
mobile devices
• That are personal
• That act as companions
• That are easy to use
• That are connected

16
Mobile Categories
Mobile devices can loosely be divided into classes:

Low end phones: have small screens, limited memory and basic
applications, e.g., camera and music player

Smartphones: have a high-end OS, a full desktop browser, Wireless


LAN (Wi-Fi, 3G/4G/5G), and features such as a music player,
camera/Video-camera, GPS, touch support, and accelerometer

Tablets: have all the features of a smartphone as well as higher


screen sizes and form factors, better display technology (e.g.,
Kindle) and higher performance

17
Mobile Knowledge
The following factors are important for working with mobile devices:-

Display sizes: start at 1.5” and typically go to 4.5” for


smartphones and 9.7” for the iPad

Display resolution:
◦ Low end – 128x160 to 128x128 pixels
◦ Mid to high end – 176x208 to 240x320 pixels
◦ Smartphones – 240x480 to 640x960 pixels
◦ Tablets – iPad 768x1024 pixels, Galaxy Tab 600x1024 pixels

18
Mobile Knowledge - cont.
Physical Dimensions: To really compare the display
quality we need to take into account the physical size of
the display, the resolution in pixels, the pixels per inch
(ppi) and the colour capability of the device

Aspect Ratio: the ratio of the length and width of a


device is called its aspect ratio. Images scaled to fit the
display will be distorted based on the aspect ratio,
particularly when a device can swap between portrait
and landscape views

19
Mobile Knowledge - cont.
Input methods include numeric keypads,
alphanumeric keypads, virtual screen-based
keypads, touch and multi-touch support,
external keypads, handwriting and voice
recognition systems

Other features include geo-location, phone


calls, SMS and MMS services

20
Brands and Models
Apple
The 1st iPhone was unveiled in 2007. It revolutionised
the marketplace as:

it set a standard for smartphones in terms of power, ease of use


and the number of applications available (“there’s an App for that”)

In 2007 Apple released the iPad which set the gold standard for
tablet devices

All Apple devices run a version of iOS using Cocoa Touch and
Objective C

21
Brands and Models – cont.
Nokia
Nokia had the largest market share but lost its place to Android phones in 2011. Nokia has
a well-developed OS called Symbian

BlackBerry
Research in Motion (RIM) is the Canadian manufacturer of the popular Blackberry mobile
device. Primarily used by corporate firms as it has good security and enterprise features

Samsung
This Korean manufacturer of phone has the 2nd largest market share after Nokia. Samsung
supports native devices, devices based on Symbian, Android and Windows OS.
Smartphones and tablets use Symbian, Android or the Windows Mobile OS

22
Platforms
iOS (formerly iPhone
OS) is a mobile operating
system created and
developed by Apple Inc.

23
Platforms – cont.
Android is a mobile operating
system based on a modified
version of the Linux
kernel and other open-
source software, designed
primarily
for touchscreen mobile
devices such
as smartphones and tablets.

24
Platforms – cont.
Symbian is a discontinued mobile
operating system (OS) and computing
platform designed for smartphones.
Symbian was originally developed as
a proprietary software OS for PDAs in
1998 by the Symbian Ltd. consortium.
Symbian was used by many major
mobile phone brands,
like Samsung, Motorola, Sony
Ericsson, and above all by Nokia.

25
Platforms – cont.
Windows Mobile is a
discontinued family of mobile operating
systems developed
by Microsoft for smartphones and pers
onal digital assistants.

Following the rise of newer


smartphone OSs (iOS and Android)
Windows Mobile never equalled the
success and faded rapidly in the
following years. By February 2010,
Microsoft announced Windows
Phone to supersede
Windows Mobile.

26
Mobile Apps
Mobile Apps can be:
Web Apps – websites using HTML5, CSS and JavaScript
Native Apps – written in Java or Objective C and using
native device API’s
Hybrid Apps – use HTML but wrapped in a container and
able to use native device features

In this course we are going to be developing


Android Java based native applications

27
Week 1c: Introducing
Android Application
Development
Android Version
Android comes in a number of versions, the most common being
Android 2.2 (2010) and Android 4.0 (2011), Android
Marshmallow 6.0 (2015), Android Pie 9.0 (2020)

Older or cheaper phones tend to run earlier version of the


Android OS, so getting the target version correct is important

Android has a number of features including; storage,


connectivity, messaging, web browser, media support, hardware
support, multi-touch support, multi-tasking support, flash
support and tethering…….

29
Android Version

30
Android Version

31
Android Architecture
APPLICATIONS

APPLICATION
FRAMEWORK

ANDROID
LIBRARIES RUNTIME

LINUX KERNEL

32
Many core Android system components
Android Architecture and services, such as ART and HAL, are
built from native code that require native
libraries written in C and C++. The Android
platform provides Java framework APIs to
expose the functionality of some of these
native libraries to apps.

For devices running Android version 5.0


(API level 21) or higher, each app runs in
its own process and with its own instance
of the Android Runtime (ART).
The hardware abstraction layer (HAL)
 provides standard interfaces that expose
device hardware capabilities to the
higher-level Java API framework. 
Using a Linux kernel allows Android to
take advantage of key security features
 and allows device manufacturers to
develop hardware drivers for a well-
known kernel.
33
Android Virtual Devices
We are going to be developing and testing
our apps using a virtual mobile device

The AVD Manager within Android Studio


will allows you to configure a virtual device

34
Questions
EMAIL:
USMAN.DURRANI@UMT.EDU.P
K
35

You might also like