SlideShare a Scribd company logo
Bruce Scharlau, University of Aberdeen, 2010
Google Android
Mobile Computing
Based on android-sdk_2.2
Bruce Scharlau, University of Aberdeen, 2010
Android is part of the ‘build a
better phone’ process
Open Handset Alliance produces
Android
Open Handset Alliance produces
Android
Comprises handset manufacturers,
software firms, mobile operators, and
other manufactures and funding
companies
Comprises handset manufacturers,
software firms, mobile operators, and
other manufactures and funding
companies
http://www.openhandsetalliance.com/
Bruce Scharlau, University of Aberdeen, 2010
Android is growing
http://metrics.admob.com/wp-content/uploads/2010/06/May-2010-AdMob-Mobile-Metrics-Highlights.pdf
Does not include iTouch or iPad, as not smartphones
Uneven distribution of OS by regions
Bruce Scharlau, University of Aberdeen, 2010
Android makes mobile Java easier
http://code.google.com/android/goodies/index.html
Well, sort of…
Bruce Scharlau, University of Aberdeen, 2010
Android applications are written
in Java
package com.google.android.helloactivity;
import android.app.Activity;
import android.os.Bundle;
public class HelloActivity extends Activity {
public HelloActivity() {
}
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.hello_activity);
}
}
Bruce Scharlau, University of Aberdeen, 2010
Android applications are
compiled to Dalvik bytecode
Write app in JavaWrite app in Java
Compiled in JavaCompiled in Java
Transformed to Dalvik bytecodeTransformed to Dalvik bytecode
Linux OSLinux OS
Loaded into Dalvik VMLoaded into Dalvik VM
Code for intent passing
messages
Bruce Scharlau, University of Aberdeen, 2010
First activity
• Button search = (Button) findViewById(R.id.btnSearch);
search.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent intent = new Intent(Search.this, SearchResults.class);
Bundle b = new Bundle();
EditText txt1 = (EditText) findViewById(R.id.edittext);
EditText txt2 = (EditText) findViewById(R.id.edittext2);
b.putString("name", txt1.getText().toString());
b.putInt("state", Integer.parseInt(txt2.getText().toString()));
//Add the set of extended data to the intent and start it
intent.putExtras(b);
startActivity(intent);
}
});
Bruce Scharlau, University of Aberdeen, 2010
Second activity
• @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.search_results);
• Bundle b = getIntent().getExtras();
int value = b.getInt("state", 0);
String name = b.getString("name");
TextView vw1 = (TextView) findViewById(R.id.txtName);
TextView vw2 = (TextView) findViewById(R.id.txtState);
vw1.setText("Name: " + name);
vw2.setText("State: " + String.valueOf(value));
}
Bruce Scharlau, University of Aberdeen, 2010
Bruce Scharlau, University of Aberdeen, 2010
The Dalvik runtime is optimised
for mobile applications
Run multiple VMs efficientlyRun multiple VMs efficiently
Each app has its own VMEach app has its own VM
Minimal memory footprintMinimal memory footprint
Bruce Scharlau, University of Aberdeen, 2010
Android has many components
Can assume that most have
android 2.1 or 2.2
Bruce Scharlau, University of Aberdeen, 2010
http://developer.android.com/resources/dashboard/platform-versions.html
Bruce Scharlau, University of Aberdeen, 2010
Android has a working emulator
Bruce Scharlau, University of Aberdeen, 2010
All applications are written in
Java and available to each other
Android designed to enable reuse of
components in other applications
Android designed to enable reuse of
components in other applications
Each application can publish its
capabilities which other apps can use
Each application can publish its
capabilities which other apps can use
Bruce Scharlau, University of Aberdeen, 2010
Android applications have
common structureViews such as
lists, grids, text
boxes, buttons,
and even an
embeddable web
browser
Views such as
lists, grids, text
boxes, buttons,
and even an
embeddable web
browser
Content
Providers that
enable
applications to
access data from
other applications
(such as
Contacts), or to
share their own
data
Content
Providers that
enable
applications to
access data from
other applications
(such as
Contacts), or to
share their own
data
A Resource Manager,
providing access to non-
code resources such as
localized strings,
graphics, and layout files
A Resource Manager,
providing access to non-
code resources such as
localized strings,
graphics, and layout files
A Notification Manager
that enables all apps to
display custom alerts in the
status bar
A Notification Manager
that enables all apps to
display custom alerts in the
status bar
An Activity Manager that
manages the life cycle of
applications and provides
a common navigation
backstack
An Activity Manager that
manages the life cycle of
applications and provides
a common navigation
backstack
Bruce Scharlau, University of Aberdeen, 2010
Android applications have
common structure
Broadcast
receivers can
trigger intents that
start an application
Broadcast
receivers can
trigger intents that
start an application
Data storage
provide data for
your apps, and
can be shared
between apps –
database, file,
and shared
preferences
(hash map) used
by group of
applications
Data storage
provide data for
your apps, and
can be shared
between apps –
database, file,
and shared
preferences
(hash map) used
by group of
applications
Services run in the
background and have
no UI for the user –
they will update data,
and trigger events
Services run in the
background and have
no UI for the user –
they will update data,
and trigger events
Intents specify what
specific action should be
performed
Intents specify what
specific action should be
performed
Activity is the presentation
layer of your app: there will
be one per screen, and the
Views provide the UI to the
activity
Activity is the presentation
layer of your app: there will
be one per screen, and the
Views provide the UI to the
activity
Bruce Scharlau, University of Aberdeen, 2010
There is a common file structure
for applications
code
images
files
UI layouts
constants
Autogenerated
resource list
Bruce Scharlau, University of Aberdeen, 2010
Standard components form
building blocks for Android apps
Other applications
Has life-cycle
screen
App to handle content
Background app
Like music player
Views
manifest
Activity
Intents
Service
Notifications
ContentProviders
Bruce Scharlau, University of Aberdeen, 2010
The AndroidManifest lists
application details
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my_domain.app.helloactivity">
<application android:label="@string/app_name">
<activity android:name=".HelloActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category
android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
Bruce Scharlau, University of Aberdeen, 2010
Activity is one thing you can do
From fundamentals page in sdk
Bruce Scharlau, University of Aberdeen, 2010
Intent provides late running
binding to other apps
It can be thought of as the glue between
activities. It is basically a passive data
structure holding an abstract description of
an action to be performed.
Written as action/data pairs such as:
VIEW_ACTION/ACTION content://contacts/1
Written as action/data pairs such as:
VIEW_ACTION/ACTION content://contacts/1
Bruce Scharlau, University of Aberdeen, 2010
Services declared in the manifest
and provide support
Services run in the background:
Music player providing the music playing in
an audio application
Services run in the background:
Music player providing the music playing in
an audio application
Intensive background apps, might need to
spawn their own thread so as to not block
the application
Intensive background apps, might need to
spawn their own thread so as to not block
the application
Bruce Scharlau, University of Aberdeen, 2010
Notifications let you know of
background events
This way you know that an SMS arrived,
or that your phone is ringing, and the
MP3 player should pause
This way you know that an SMS arrived,
or that your phone is ringing, and the
MP3 player should pause
Bruce Scharlau, University of Aberdeen, 2010
ContentProviders share data
You need one if your application shares data
with other applications
You need one if your application shares data
with other applications
This way you can share the contact list with the
IM application
This way you can share the contact list with the
IM application
If you don’t need to share data, then you can
use SQLlite database
If you don’t need to share data, then you can
use SQLlite database
Bruce Scharlau, University of Aberdeen, 2010
UI layouts are in Java and XML
setContentView(R.layout.hello_activity); //will load the XML UI file
Bruce Scharlau, University of Aberdeen, 2010
Security in Android follows
standard Linux guidelines
Each application runs in its own processEach application runs in its own process
Process permissions are enforced at user
and group IDs assigned to processes
Process permissions are enforced at user
and group IDs assigned to processes
Finer grained permissions are then
granted (revoked) per operations
Finer grained permissions are then
granted (revoked) per operations
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.app.myapp" >
<uses-permission id="android.permission.RECEIVE_SMS" />
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.app.myapp" >
<uses-permission id="android.permission.RECEIVE_SMS" />
</manifest>

More Related Content

Viewers also liked

Regional &amp; sub regional frame
Regional &amp; sub regional frameRegional &amp; sub regional frame
Regional &amp; sub regional frame
Kapil Prashant
 
We speack, we impact
We speack, we impactWe speack, we impact
We speack, we impact
sergiodbotero
 
Obszar nr 1 ruch w szkole konspekt 2
Obszar nr 1 ruch w szkole konspekt 2Obszar nr 1 ruch w szkole konspekt 2
Obszar nr 1 ruch w szkole konspekt 2sp11bialystok
 
Addendum Catalogue 2013
Addendum Catalogue 2013Addendum Catalogue 2013
Addendum Catalogue 2013
ecobuild.brussels
 
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered GlassSilver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
JAGW-AlucoGlass
 
Chapter 2 scm
Chapter 2 scmChapter 2 scm
Chapter 2 scm
Sandy Thakur
 
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
CMCF(Centre Maroco-Coréen de Formation en TICE)
 
Year end dohatweetup
Year end dohatweetupYear end dohatweetup
Year end dohatweetup
DohaTweetups
 
The Morgan Legacy, Chapter 2: School and Spouse
The Morgan Legacy, Chapter 2: School and SpouseThe Morgan Legacy, Chapter 2: School and Spouse
The Morgan Legacy, Chapter 2: School and Spouse
fireflowersims
 
Κεφάλαιο 2
Κεφάλαιο 2Κεφάλαιο 2
Κεφάλαιο 2
fgousios
 
NSW Secondary Principals
NSW Secondary PrincipalsNSW Secondary Principals
NSW Secondary Principals
Shirley Alexander
 
Micronutrientes
MicronutrientesMicronutrientes
Micronutrientes
nutriscience
 
Pavan tabbu- ppt.
Pavan   tabbu- ppt.Pavan   tabbu- ppt.
Pavan tabbu- ppt.
Reshma Saifi
 
Eldin soal jawab
Eldin soal jawabEldin soal jawab
Eldin soal jawab
Wahid Azila
 
77 el arb.-
77 el arb.-77 el arb.-
77 el arb.-
Garbriela_224
 

Viewers also liked (17)

Regional &amp; sub regional frame
Regional &amp; sub regional frameRegional &amp; sub regional frame
Regional &amp; sub regional frame
 
We speack, we impact
We speack, we impactWe speack, we impact
We speack, we impact
 
Tugas 4
Tugas 4Tugas 4
Tugas 4
 
Obszar nr 1 ruch w szkole konspekt 2
Obszar nr 1 ruch w szkole konspekt 2Obszar nr 1 ruch w szkole konspekt 2
Obszar nr 1 ruch w szkole konspekt 2
 
Addendum Catalogue 2013
Addendum Catalogue 2013Addendum Catalogue 2013
Addendum Catalogue 2013
 
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered GlassSilver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
Silver Trade Center-Curtain Wall, Aluminum Composite Panel and Tempered Glass
 
Chapter 2 scm
Chapter 2 scmChapter 2 scm
Chapter 2 scm
 
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
المناصب الشاغرة لمؤسسات التعليم الابتدائي لسنة 2016
 
Year end dohatweetup
Year end dohatweetupYear end dohatweetup
Year end dohatweetup
 
The Morgan Legacy, Chapter 2: School and Spouse
The Morgan Legacy, Chapter 2: School and SpouseThe Morgan Legacy, Chapter 2: School and Spouse
The Morgan Legacy, Chapter 2: School and Spouse
 
Κεφάλαιο 2
Κεφάλαιο 2Κεφάλαιο 2
Κεφάλαιο 2
 
NSW Secondary Principals
NSW Secondary PrincipalsNSW Secondary Principals
NSW Secondary Principals
 
Micronutrientes
MicronutrientesMicronutrientes
Micronutrientes
 
Pavan tabbu- ppt.
Pavan   tabbu- ppt.Pavan   tabbu- ppt.
Pavan tabbu- ppt.
 
Eldin soal jawab
Eldin soal jawabEldin soal jawab
Eldin soal jawab
 
Jawapan (1)
Jawapan (1)Jawapan (1)
Jawapan (1)
 
77 el arb.-
77 el arb.-77 el arb.-
77 el arb.-
 

Similar to Google Android Mobile Computing

android
androidandroid
Mc android
Mc androidMc android
Mc android
Moresh Kashikar
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdf
AbdullahMunir32
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdf
AbdullahMunir32
 
Nativa Android Applications development
Nativa Android Applications developmentNativa Android Applications development
Nativa Android Applications development
Alfredo Morresi
 
Android
AndroidAndroid
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARIMOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
SivaSankari36
 
Android Introduction by Kajal
Android Introduction by KajalAndroid Introduction by Kajal
Android Introduction by Kajal
Kajal Kucheriya Jain
 
Google android white paper
Google android white paperGoogle android white paper
Google android white paper
Sravan Reddy
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdf
AbdullahMunir32
 
First Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionFirst Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting Introduction
Cesar Augusto Nogueira
 
Mobility Solutions - Development of Hybrid Mobile Applications with HTML
Mobility Solutions - Development of Hybrid Mobile Applications with HTMLMobility Solutions - Development of Hybrid Mobile Applications with HTML
Mobility Solutions - Development of Hybrid Mobile Applications with HTML
Mindteck (India) Limited
 
B041130610
B041130610B041130610
B041130610
IOSR-JEN
 
Android by Ravindra J.Mandale
Android by Ravindra J.MandaleAndroid by Ravindra J.Mandale
Android by Ravindra J.Mandale
Ravindra Mandale
 
android app development training report
android app development training reportandroid app development training report
android app development training report
Rishita Jaggi
 
Android
AndroidAndroid
Blending Creativity and Technology With Android App Development
Blending Creativity and Technology With Android App DevelopmentBlending Creativity and Technology With Android App Development
Blending Creativity and Technology With Android App Development
amanraza23
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
Palani Kumar
 
Hybrid mobile app
Hybrid mobile appHybrid mobile app
Hybrid mobile app
Palani Kumar
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
Dilip Singh
 

Similar to Google Android Mobile Computing (20)

android
androidandroid
android
 
Mc android
Mc androidMc android
Mc android
 
Mobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdfMobile Application Development-Lecture 01 & 02.pdf
Mobile Application Development-Lecture 01 & 02.pdf
 
Mobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdfMobile Application Development Lecture 05 & 06.pdf
Mobile Application Development Lecture 05 & 06.pdf
 
Nativa Android Applications development
Nativa Android Applications developmentNativa Android Applications development
Nativa Android Applications development
 
Android
AndroidAndroid
Android
 
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARIMOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
MOBILE APPLICATIONS DEVELOPMENT -ANDROID BY SIVASANKARI
 
Android Introduction by Kajal
Android Introduction by KajalAndroid Introduction by Kajal
Android Introduction by Kajal
 
Google android white paper
Google android white paperGoogle android white paper
Google android white paper
 
Mobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdfMobile Application Development -Lecture 11 & 12.pdf
Mobile Application Development -Lecture 11 & 12.pdf
 
First Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting IntroductionFirst Steps with Android - An Exciting Introduction
First Steps with Android - An Exciting Introduction
 
Mobility Solutions - Development of Hybrid Mobile Applications with HTML
Mobility Solutions - Development of Hybrid Mobile Applications with HTMLMobility Solutions - Development of Hybrid Mobile Applications with HTML
Mobility Solutions - Development of Hybrid Mobile Applications with HTML
 
B041130610
B041130610B041130610
B041130610
 
Android by Ravindra J.Mandale
Android by Ravindra J.MandaleAndroid by Ravindra J.Mandale
Android by Ravindra J.Mandale
 
android app development training report
android app development training reportandroid app development training report
android app development training report
 
Android
AndroidAndroid
Android
 
Blending Creativity and Technology With Android App Development
Blending Creativity and Technology With Android App DevelopmentBlending Creativity and Technology With Android App Development
Blending Creativity and Technology With Android App Development
 
Hybrid Mobile App
Hybrid Mobile AppHybrid Mobile App
Hybrid Mobile App
 
Hybrid mobile app
Hybrid mobile appHybrid mobile app
Hybrid mobile app
 
Android 1-intro n architecture
Android 1-intro n architectureAndroid 1-intro n architecture
Android 1-intro n architecture
 

Recently uploaded

How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 

Recently uploaded (20)

How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 

Google Android Mobile Computing

  • 1. Bruce Scharlau, University of Aberdeen, 2010 Google Android Mobile Computing Based on android-sdk_2.2
  • 2. Bruce Scharlau, University of Aberdeen, 2010 Android is part of the ‘build a better phone’ process Open Handset Alliance produces Android Open Handset Alliance produces Android Comprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies Comprises handset manufacturers, software firms, mobile operators, and other manufactures and funding companies http://www.openhandsetalliance.com/
  • 3. Bruce Scharlau, University of Aberdeen, 2010 Android is growing http://metrics.admob.com/wp-content/uploads/2010/06/May-2010-AdMob-Mobile-Metrics-Highlights.pdf Does not include iTouch or iPad, as not smartphones Uneven distribution of OS by regions
  • 4. Bruce Scharlau, University of Aberdeen, 2010 Android makes mobile Java easier http://code.google.com/android/goodies/index.html Well, sort of…
  • 5. Bruce Scharlau, University of Aberdeen, 2010 Android applications are written in Java package com.google.android.helloactivity; import android.app.Activity; import android.os.Bundle; public class HelloActivity extends Activity { public HelloActivity() { } @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.hello_activity); } }
  • 6. Bruce Scharlau, University of Aberdeen, 2010 Android applications are compiled to Dalvik bytecode Write app in JavaWrite app in Java Compiled in JavaCompiled in Java Transformed to Dalvik bytecodeTransformed to Dalvik bytecode Linux OSLinux OS Loaded into Dalvik VMLoaded into Dalvik VM
  • 7. Code for intent passing messages Bruce Scharlau, University of Aberdeen, 2010
  • 8. First activity • Button search = (Button) findViewById(R.id.btnSearch); search.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { Intent intent = new Intent(Search.this, SearchResults.class); Bundle b = new Bundle(); EditText txt1 = (EditText) findViewById(R.id.edittext); EditText txt2 = (EditText) findViewById(R.id.edittext2); b.putString("name", txt1.getText().toString()); b.putInt("state", Integer.parseInt(txt2.getText().toString())); //Add the set of extended data to the intent and start it intent.putExtras(b); startActivity(intent); } }); Bruce Scharlau, University of Aberdeen, 2010
  • 9. Second activity • @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.search_results); • Bundle b = getIntent().getExtras(); int value = b.getInt("state", 0); String name = b.getString("name"); TextView vw1 = (TextView) findViewById(R.id.txtName); TextView vw2 = (TextView) findViewById(R.id.txtState); vw1.setText("Name: " + name); vw2.setText("State: " + String.valueOf(value)); } Bruce Scharlau, University of Aberdeen, 2010
  • 10. Bruce Scharlau, University of Aberdeen, 2010 The Dalvik runtime is optimised for mobile applications Run multiple VMs efficientlyRun multiple VMs efficiently Each app has its own VMEach app has its own VM Minimal memory footprintMinimal memory footprint
  • 11. Bruce Scharlau, University of Aberdeen, 2010 Android has many components
  • 12. Can assume that most have android 2.1 or 2.2 Bruce Scharlau, University of Aberdeen, 2010 http://developer.android.com/resources/dashboard/platform-versions.html
  • 13. Bruce Scharlau, University of Aberdeen, 2010 Android has a working emulator
  • 14. Bruce Scharlau, University of Aberdeen, 2010 All applications are written in Java and available to each other Android designed to enable reuse of components in other applications Android designed to enable reuse of components in other applications Each application can publish its capabilities which other apps can use Each application can publish its capabilities which other apps can use
  • 15. Bruce Scharlau, University of Aberdeen, 2010 Android applications have common structureViews such as lists, grids, text boxes, buttons, and even an embeddable web browser Views such as lists, grids, text boxes, buttons, and even an embeddable web browser Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data A Resource Manager, providing access to non- code resources such as localized strings, graphics, and layout files A Resource Manager, providing access to non- code resources such as localized strings, graphics, and layout files A Notification Manager that enables all apps to display custom alerts in the status bar A Notification Manager that enables all apps to display custom alerts in the status bar An Activity Manager that manages the life cycle of applications and provides a common navigation backstack An Activity Manager that manages the life cycle of applications and provides a common navigation backstack
  • 16. Bruce Scharlau, University of Aberdeen, 2010 Android applications have common structure Broadcast receivers can trigger intents that start an application Broadcast receivers can trigger intents that start an application Data storage provide data for your apps, and can be shared between apps – database, file, and shared preferences (hash map) used by group of applications Data storage provide data for your apps, and can be shared between apps – database, file, and shared preferences (hash map) used by group of applications Services run in the background and have no UI for the user – they will update data, and trigger events Services run in the background and have no UI for the user – they will update data, and trigger events Intents specify what specific action should be performed Intents specify what specific action should be performed Activity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activity Activity is the presentation layer of your app: there will be one per screen, and the Views provide the UI to the activity
  • 17. Bruce Scharlau, University of Aberdeen, 2010 There is a common file structure for applications code images files UI layouts constants Autogenerated resource list
  • 18. Bruce Scharlau, University of Aberdeen, 2010 Standard components form building blocks for Android apps Other applications Has life-cycle screen App to handle content Background app Like music player Views manifest Activity Intents Service Notifications ContentProviders
  • 19. Bruce Scharlau, University of Aberdeen, 2010 The AndroidManifest lists application details <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.my_domain.app.helloactivity"> <application android:label="@string/app_name"> <activity android:name=".HelloActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> </application>
  • 20. Bruce Scharlau, University of Aberdeen, 2010 Activity is one thing you can do From fundamentals page in sdk
  • 21. Bruce Scharlau, University of Aberdeen, 2010 Intent provides late running binding to other apps It can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. Written as action/data pairs such as: VIEW_ACTION/ACTION content://contacts/1 Written as action/data pairs such as: VIEW_ACTION/ACTION content://contacts/1
  • 22. Bruce Scharlau, University of Aberdeen, 2010 Services declared in the manifest and provide support Services run in the background: Music player providing the music playing in an audio application Services run in the background: Music player providing the music playing in an audio application Intensive background apps, might need to spawn their own thread so as to not block the application Intensive background apps, might need to spawn their own thread so as to not block the application
  • 23. Bruce Scharlau, University of Aberdeen, 2010 Notifications let you know of background events This way you know that an SMS arrived, or that your phone is ringing, and the MP3 player should pause This way you know that an SMS arrived, or that your phone is ringing, and the MP3 player should pause
  • 24. Bruce Scharlau, University of Aberdeen, 2010 ContentProviders share data You need one if your application shares data with other applications You need one if your application shares data with other applications This way you can share the contact list with the IM application This way you can share the contact list with the IM application If you don’t need to share data, then you can use SQLlite database If you don’t need to share data, then you can use SQLlite database
  • 25. Bruce Scharlau, University of Aberdeen, 2010 UI layouts are in Java and XML setContentView(R.layout.hello_activity); //will load the XML UI file
  • 26. Bruce Scharlau, University of Aberdeen, 2010 Security in Android follows standard Linux guidelines Each application runs in its own processEach application runs in its own process Process permissions are enforced at user and group IDs assigned to processes Process permissions are enforced at user and group IDs assigned to processes Finer grained permissions are then granted (revoked) per operations Finer grained permissions are then granted (revoked) per operations <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.app.myapp" > <uses-permission id="android.permission.RECEIVE_SMS" /> </manifest> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.app.myapp" > <uses-permission id="android.permission.RECEIVE_SMS" /> </manifest>