SlideShare uma empresa Scribd logo
1 de 24
Android GUI Project

John Hurley
CS 454
Android
•
•
•
•
•

1. Android Basics
2. Android Development
3. Android UI
4. Hello, World
5. My Project
•

•
•

•

Android Basics

Open source OS
• Uses Linux kernel
• Optimized for limited-resource environment
Apps typically written in Java
Apps run on the Dalvik Virtual Machine
• Not a JVM, but works similarly from developer’s point
of view
• Usually one app per DVM
• Each DVM runs under Linux as a separate user
• App permissions set at install time
Possible to use C or C++ compiled to machine code, but still
runs on VM. It’s not clear to me how this works.
• Docs say it does not necessarily improve performance.
Sams Teach Yourself Android™Application Development in 24 Hours (0321673352)

FIGURE 5.6 Simplified Android platform architecture from a security perspective.

Copyright ©2010 Lauren Darcey and Shane Conder
Android Development
• Well-defined framework for app development
• Apps are typically coded using Java syntax, but
other parts of the Java platform are missing
• Some standard Java SE or ME APIs and class
libraries are not included
• I will give examples when I find out!
Android Development
•
•
•

Standard development environment is Eclipse + Android
Development Tools plugin + Android SDK
Development requires either an Android OS device or an
emulator
Emulator has limitations:
•
•
•
•

•

Performance is poor
Camera, etc., simulated using your computer’s hardware
No real phone calls or texts
GPS data, battery readings, etc. must be simulated

Real device is affected by specific hardware and software
configuration
OS
I was able to choose what kind of smart phone to get according
to which platform I wanted to use to try mobile development

Android:
•I had Java backend code ready to go for a first project
•Interesting platform:
• Familiar programming environment
• Currently the market leader
• Broad market, unlike more focused iOS, Blackberry, and
(Palm) webOS
• Development tools are open source and are free even for
commercial use, unlike Visual Studio
Android App vs. Mobile- Optimized RIA
•
•

Android Flash plugins available; Silverlight coming soon
Could develop in JavaScript and/or HTML5

•

WWW App
• Easier for users to run; no need to install
• For a paid app, avoid the 30% App Store commission
• Easier to write cross-platform apps

•

Android Apps
•
Fewer security hurdles
• Use APIs for access to built in GPS, camera, etc.
• Probably better performance; one layer less
Android Apps: Marketing
•

Usually market apps through Android App Market
• There are other markets, also
•

•

App store will dominate the market due to access through
built in app

Can set up for download directly on a website
•

User must agree to “install apps from unknown sources”
Android Apps: Marketing
•

•
•

•

Revenue from app sales prices and/or advertising
• Conventional wisdom is that iOS users will pay for apps,
but Android users won’t
• 57% of Android App Store apps are free, vs. 28% for Apple
App Store
• Android Market takes 30% commission
Any purchase model other than one-time purchase must be
homegrown, using Paypal or similar service
PPC ads
• My guess is that response to these is extremely low
• Probably need to be very aggressive with banner ads
Sell to companies?
Android Deployment
• Apps are packaged in .apk format, variant of .jar,
then downloaded to device and installed
• .apks contain .dex files (bytecode), manifest and
various other files
• Manifest contains security and link info,
hardware access info, minimum OS release info,
etc.
Android UI
•

•

Activity: single screen with a UI, somewhat analogous to
XAML / code behind pattern in .NET
• Email app might have one activity that shows a list of
new emails, another activity to compose an email, and
another activity for reading emails
• Implement by subclassing Activity class
View: drawable object
•

Android UI View ≠ MVC View

•
•

UI contains a hierarchy of Views
View is a class, subclassed by the drawable objects in
the UI
Android UI
• Service: background operation
• play music in the background while the user is in
a different application
• fetch data over the network without blocking
user interaction with an activity
• Content Provider: DB or other data access
• Broadcast Receiver: responds to system messages
• Battery low
Android UI
• UI construction can be done in three ways:
• Programmatic, like hand-coded Java desktop GUI
construction
• Declarative hand-written, like Java web UI
construction
•

XML

• Declarative with a GUI builder, like .NET UI
construction
•

GUI builder generates the XML
Programmatic UI
package cs454.demo;
import android.app.Activity;
import android.widget.TextView;
import android.os.Bundle;
public class AndroidDemo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Activity is a subclass of context, so the TextView takes this as a parameter
TextView tv = new TextView(this);
tv.setText("Hello, CS454");
setContentView(tv);
}
}
Manual Declarative UI
main.xml Layout File:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
strings.xml resource file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello Again, CS454!</string>
<string name="app_name">CS454 AndroidDemo</string>
</resources>
Manual Declarative UI
Java class:

package cs454.demo;
import android.app.Activity;
import android.os.Bundle;
public class AndroidDemo extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
What’s R?

/* AUTO-GENERATED FILE. DO NOT MODIFY. This class was automatically generated by the
* aapt tool from the resource data it found. It should not be modified by hand. */
package cs454.demo;
public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class id {
public static final int textview=0x7f050000;
}
public static final class layout {
public static final int main=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f040000;
}
UI With GUI Builder
Android Event Handlers
From the code file for the activity:
Button ok = (Button) findViewById(R.id.button1);
ok.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
CharSequence s = et.getText();
tv.setText("Welcome, " + s);
}
});
Sams Teach Yourself Android™Application Development in 24 Hours (0321673352)

FIGURE 3.2 Important callback methods of the activity life cycle.

Copyright ©2010 Lauren Darcey and Shane Conder
APIs for Android built-ins
• Android OS ships with many built in apps
• Web Browser
• Google Maps
• Navigation
• Camera apps
• Built in access for these as well as TTS and Voice
Recognition, etc.
My Project
•
•

•
•

Goats and Tigers is a board game, which we implemented in
Java in CS 460 last term.
The objective in CS460 was to implement the minmax / alpha
beta pruning algorithm for the automatic player, not to
create a good UI
My existing interface shows an ASCII art picture of the board
and provides a JOptionPane menu of available moves
I will develop an Android UI and use my existing backend
code as much as possible
•

•
•
•

References

http://www.ibm.com/developerworks/opensource/library/os-androiddevel/
http://developer.android.com/resources/browser.html?tag=tutorial
Conder and Darcey, Android Wireless Application Development, AddisonWesley, 2010
Conder and Darcey, Sams Teach Yourself Android Application
Development in 24 Hours, Sams, 2010

Mais conteúdo relacionado

Mais procurados

Cross-platform development with Qt and OpenGL ES 2.0
Cross-platform development with Qt and OpenGL ES 2.0Cross-platform development with Qt and OpenGL ES 2.0
Cross-platform development with Qt and OpenGL ES 2.0feldifux
 
Top 10 programming languages for mobile app development
Top 10 programming languages for mobile app developmentTop 10 programming languages for mobile app development
Top 10 programming languages for mobile app developmentWxit Consultant Services
 
The Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyThe Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyOlivia2590
 
Android : Evolution or Revolution
Android : Evolution or RevolutionAndroid : Evolution or Revolution
Android : Evolution or RevolutionSanjiv Malik
 
Mobile app development - course intro
Mobile app development - course introMobile app development - course intro
Mobile app development - course introIvano Malavolta
 
Tizen operating system by srisailam
Tizen operating system by srisailamTizen operating system by srisailam
Tizen operating system by srisailamSrisailam Muntha
 
Android by Ravindra J.Mandale
Android by Ravindra J.MandaleAndroid by Ravindra J.Mandale
Android by Ravindra J.MandaleRavindra Mandale
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - PresentationAtul Panjwani
 
Webinar Roadmap TotalCross 2020
Webinar Roadmap TotalCross 2020Webinar Roadmap TotalCross 2020
Webinar Roadmap TotalCross 2020Bruno Muniz
 
Android Technology
Android TechnologyAndroid Technology
Android TechnologyAmar Shah
 
Seminar on Tizen OS
Seminar on Tizen OSSeminar on Tizen OS
Seminar on Tizen OSFriend Porag
 
Android the sweetmobility
Android the sweetmobilityAndroid the sweetmobility
Android the sweetmobilityindiangarg
 

Mais procurados (20)

Cross-platform development with Qt and OpenGL ES 2.0
Cross-platform development with Qt and OpenGL ES 2.0Cross-platform development with Qt and OpenGL ES 2.0
Cross-platform development with Qt and OpenGL ES 2.0
 
Top 10 programming languages for mobile app development
Top 10 programming languages for mobile app developmentTop 10 programming languages for mobile app development
Top 10 programming languages for mobile app development
 
App development
App developmentApp development
App development
 
The Importance of Cross Platform Technology
The Importance of Cross Platform TechnologyThe Importance of Cross Platform Technology
The Importance of Cross Platform Technology
 
Tizen
TizenTizen
Tizen
 
Android : Evolution or Revolution
Android : Evolution or RevolutionAndroid : Evolution or Revolution
Android : Evolution or Revolution
 
Mobile app development - course intro
Mobile app development - course introMobile app development - course intro
Mobile app development - course intro
 
Mobile News Round Up
Mobile News Round UpMobile News Round Up
Mobile News Round Up
 
Google android
Google androidGoogle android
Google android
 
Tizen os seminar report
Tizen os seminar reportTizen os seminar report
Tizen os seminar report
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 
Tizen operating system by srisailam
Tizen operating system by srisailamTizen operating system by srisailam
Tizen operating system by srisailam
 
Basic android
Basic androidBasic android
Basic android
 
Android by Ravindra J.Mandale
Android by Ravindra J.MandaleAndroid by Ravindra J.Mandale
Android by Ravindra J.Mandale
 
Introduction to Android development - Presentation
Introduction to Android development - PresentationIntroduction to Android development - Presentation
Introduction to Android development - Presentation
 
Webinar Roadmap TotalCross 2020
Webinar Roadmap TotalCross 2020Webinar Roadmap TotalCross 2020
Webinar Roadmap TotalCross 2020
 
Android vs windows
Android vs windowsAndroid vs windows
Android vs windows
 
Android Technology
Android TechnologyAndroid Technology
Android Technology
 
Seminar on Tizen OS
Seminar on Tizen OSSeminar on Tizen OS
Seminar on Tizen OS
 
Android the sweetmobility
Android the sweetmobilityAndroid the sweetmobility
Android the sweetmobility
 

Destaque

This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...
This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...
This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...Wolf Loescher
 
Urine for a Treat (or: ASP.NET MVC)
Urine for a Treat (or: ASP.NET MVC)Urine for a Treat (or: ASP.NET MVC)
Urine for a Treat (or: ASP.NET MVC)Joey DeVilla
 
Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidMotorola Mobility - MOTODEV
 
EDTED SP - HTML 5 e CSS 3 - Junho de 2011
EDTED SP - HTML 5 e CSS 3 - Junho de 2011EDTED SP - HTML 5 e CSS 3 - Junho de 2011
EDTED SP - HTML 5 e CSS 3 - Junho de 2011Leonardo Balter
 
365on Lab Asp.Net MVC Fundamentos 01 Overview
365on Lab Asp.Net MVC Fundamentos 01 Overview365on Lab Asp.Net MVC Fundamentos 01 Overview
365on Lab Asp.Net MVC Fundamentos 01 OverviewAlexsandro Almeida
 
【第一季第五期】要漂亮很容易!——超简单CSS速成教程
【第一季第五期】要漂亮很容易!——超简单CSS速成教程【第一季第五期】要漂亮很容易!——超简单CSS速成教程
【第一季第五期】要漂亮很容易!——超简单CSS速成教程tbosstraining
 
Android Basics
Android BasicsAndroid Basics
Android Basicsgauthamns
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introductionTomi Juhola
 
Android Applications Introduction
Android Applications IntroductionAndroid Applications Introduction
Android Applications IntroductionAnjali Rao
 
ASP.NET MVC, REST, and Open Source Software
ASP.NET MVC, REST, and Open Source SoftwareASP.NET MVC, REST, and Open Source Software
ASP.NET MVC, REST, and Open Source SoftwareJoe Fiorini
 
Easy css
Easy cssEasy css
Easy css立 姚
 
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸twMVC
 

Destaque (20)

This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...
This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...
This Old Website: : Applying HTML5, CSS3, and Responsive Design to An Existin...
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Urine for a Treat (or: ASP.NET MVC)
Urine for a Treat (or: ASP.NET MVC)Urine for a Treat (or: ASP.NET MVC)
Urine for a Treat (or: ASP.NET MVC)
 
Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for Android
 
20121019-HTML5
20121019-HTML520121019-HTML5
20121019-HTML5
 
EDTED SP - HTML 5 e CSS 3 - Junho de 2011
EDTED SP - HTML 5 e CSS 3 - Junho de 2011EDTED SP - HTML 5 e CSS 3 - Junho de 2011
EDTED SP - HTML 5 e CSS 3 - Junho de 2011
 
Android basics
Android basicsAndroid basics
Android basics
 
Android basics
Android basicsAndroid basics
Android basics
 
365on Lab Asp.Net MVC Fundamentos 01 Overview
365on Lab Asp.Net MVC Fundamentos 01 Overview365on Lab Asp.Net MVC Fundamentos 01 Overview
365on Lab Asp.Net MVC Fundamentos 01 Overview
 
HTML 5 Overview
HTML 5 OverviewHTML 5 Overview
HTML 5 Overview
 
【第一季第五期】要漂亮很容易!——超简单CSS速成教程
【第一季第五期】要漂亮很容易!——超简单CSS速成教程【第一季第五期】要漂亮很容易!——超简单CSS速成教程
【第一季第五期】要漂亮很容易!——超简单CSS速成教程
 
Android
AndroidAndroid
Android
 
Android Basics
Android BasicsAndroid Basics
Android Basics
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
HTML 5 and CSS 3
HTML 5 and CSS 3HTML 5 and CSS 3
HTML 5 and CSS 3
 
Android basics
Android basicsAndroid basics
Android basics
 
Android Applications Introduction
Android Applications IntroductionAndroid Applications Introduction
Android Applications Introduction
 
ASP.NET MVC, REST, and Open Source Software
ASP.NET MVC, REST, and Open Source SoftwareASP.NET MVC, REST, and Open Source Software
ASP.NET MVC, REST, and Open Source Software
 
Easy css
Easy cssEasy css
Easy css
 
twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸twMVC#01 | ASP.NET MVC 的第一次親密接觸
twMVC#01 | ASP.NET MVC 的第一次親密接觸
 

Semelhante a Pertemuan 3 pm

Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
 
Android workshop
Android workshopAndroid workshop
Android workshopSagar Patel
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Android development
Android developmentAndroid development
Android developmentmkpartners
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studioAbdul Basit
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Gustavo Fuentes Zurita
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Gustavo Fuentes Zurita
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android ApplicationNandini Prabhu
 

Semelhante a Pertemuan 3 pm (20)

Presentation1
Presentation1Presentation1
Presentation1
 
Android class provider in mumbai
Android class provider in mumbaiAndroid class provider in mumbai
Android class provider in mumbai
 
Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android development
Android developmentAndroid development
Android development
 
Introduction_to_android_and_android_studio
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studio
 
Android Tutorial
Android TutorialAndroid Tutorial
Android Tutorial
 
Android development first steps
Android development   first stepsAndroid development   first steps
Android development first steps
 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
 
Android app devolopment
Android app devolopmentAndroid app devolopment
Android app devolopment
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Android Programming
Android ProgrammingAndroid Programming
Android Programming
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9Androidoscon20080721 1216843094441821-9
Androidoscon20080721 1216843094441821-9
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 

Mais de obanganggara

Sekilas Tentang I phone
Sekilas Tentang I phoneSekilas Tentang I phone
Sekilas Tentang I phoneobanganggara
 
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"obanganggara
 
Perencanaan pembuatan cloud computing
Perencanaan pembuatan cloud computingPerencanaan pembuatan cloud computing
Perencanaan pembuatan cloud computingobanganggara
 
PERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIPERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIobanganggara
 
Modul "Pemberian Ip addressing"
Modul "Pemberian Ip addressing"Modul "Pemberian Ip addressing"
Modul "Pemberian Ip addressing"obanganggara
 
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...obanganggara
 
PERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIPERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIobanganggara
 
Pertemuan 3 user interface (ui)
Pertemuan 3 user interface (ui)Pertemuan 3 user interface (ui)
Pertemuan 3 user interface (ui)obanganggara
 
Pertemuan 4 widget
Pertemuan 4 widgetPertemuan 4 widget
Pertemuan 4 widgetobanganggara
 

Mais de obanganggara (20)

Sekilas Tentang I phone
Sekilas Tentang I phoneSekilas Tentang I phone
Sekilas Tentang I phone
 
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"
Study kasus "PENGAMANAN FIREWALL FOSS AMIKOM"
 
Tugas 1
Tugas 1Tugas 1
Tugas 1
 
Perencanaan pembuatan cloud computing
Perencanaan pembuatan cloud computingPerencanaan pembuatan cloud computing
Perencanaan pembuatan cloud computing
 
PERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIPERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASI
 
Modul "Pemberian Ip addressing"
Modul "Pemberian Ip addressing"Modul "Pemberian Ip addressing"
Modul "Pemberian Ip addressing"
 
Modul MIKROTIK
Modul MIKROTIKModul MIKROTIK
Modul MIKROTIK
 
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...
PRESENTSI MAKALAH DAMPAK POSITIF DAN NEGATIF DARI PERKEMBANGAN MEDIA SOSIAL P...
 
PERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASIPERANCANGAN DATABASE DAN IMPLEMENTASI
PERANCANGAN DATABASE DAN IMPLEMENTASI
 
Presentation1
Presentation1Presentation1
Presentation1
 
I phone
I phoneI phone
I phone
 
Pertemuan 3 user interface (ui)
Pertemuan 3 user interface (ui)Pertemuan 3 user interface (ui)
Pertemuan 3 user interface (ui)
 
Pertemuan 4 widget
Pertemuan 4 widgetPertemuan 4 widget
Pertemuan 4 widget
 
Sim 9
Sim 9Sim 9
Sim 9
 
Sim 8
Sim 8Sim 8
Sim 8
 
Sim 7
Sim 7Sim 7
Sim 7
 
Sim 6
Sim 6Sim 6
Sim 6
 
Sim 5
Sim 5Sim 5
Sim 5
 
Sim 4
Sim 4Sim 4
Sim 4
 
Sim 3
Sim 3Sim 3
Sim 3
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Pertemuan 3 pm

  • 1. Android GUI Project John Hurley CS 454
  • 2. Android • • • • • 1. Android Basics 2. Android Development 3. Android UI 4. Hello, World 5. My Project
  • 3. • • • • Android Basics Open source OS • Uses Linux kernel • Optimized for limited-resource environment Apps typically written in Java Apps run on the Dalvik Virtual Machine • Not a JVM, but works similarly from developer’s point of view • Usually one app per DVM • Each DVM runs under Linux as a separate user • App permissions set at install time Possible to use C or C++ compiled to machine code, but still runs on VM. It’s not clear to me how this works. • Docs say it does not necessarily improve performance.
  • 4. Sams Teach Yourself Android™Application Development in 24 Hours (0321673352) FIGURE 5.6 Simplified Android platform architecture from a security perspective. Copyright ©2010 Lauren Darcey and Shane Conder
  • 5. Android Development • Well-defined framework for app development • Apps are typically coded using Java syntax, but other parts of the Java platform are missing • Some standard Java SE or ME APIs and class libraries are not included • I will give examples when I find out!
  • 6. Android Development • • • Standard development environment is Eclipse + Android Development Tools plugin + Android SDK Development requires either an Android OS device or an emulator Emulator has limitations: • • • • • Performance is poor Camera, etc., simulated using your computer’s hardware No real phone calls or texts GPS data, battery readings, etc. must be simulated Real device is affected by specific hardware and software configuration
  • 7. OS I was able to choose what kind of smart phone to get according to which platform I wanted to use to try mobile development Android: •I had Java backend code ready to go for a first project •Interesting platform: • Familiar programming environment • Currently the market leader • Broad market, unlike more focused iOS, Blackberry, and (Palm) webOS • Development tools are open source and are free even for commercial use, unlike Visual Studio
  • 8. Android App vs. Mobile- Optimized RIA • • Android Flash plugins available; Silverlight coming soon Could develop in JavaScript and/or HTML5 • WWW App • Easier for users to run; no need to install • For a paid app, avoid the 30% App Store commission • Easier to write cross-platform apps • Android Apps • Fewer security hurdles • Use APIs for access to built in GPS, camera, etc. • Probably better performance; one layer less
  • 9. Android Apps: Marketing • Usually market apps through Android App Market • There are other markets, also • • App store will dominate the market due to access through built in app Can set up for download directly on a website • User must agree to “install apps from unknown sources”
  • 10. Android Apps: Marketing • • • • Revenue from app sales prices and/or advertising • Conventional wisdom is that iOS users will pay for apps, but Android users won’t • 57% of Android App Store apps are free, vs. 28% for Apple App Store • Android Market takes 30% commission Any purchase model other than one-time purchase must be homegrown, using Paypal or similar service PPC ads • My guess is that response to these is extremely low • Probably need to be very aggressive with banner ads Sell to companies?
  • 11. Android Deployment • Apps are packaged in .apk format, variant of .jar, then downloaded to device and installed • .apks contain .dex files (bytecode), manifest and various other files • Manifest contains security and link info, hardware access info, minimum OS release info, etc.
  • 12. Android UI • • Activity: single screen with a UI, somewhat analogous to XAML / code behind pattern in .NET • Email app might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails • Implement by subclassing Activity class View: drawable object • Android UI View ≠ MVC View • • UI contains a hierarchy of Views View is a class, subclassed by the drawable objects in the UI
  • 13. Android UI • Service: background operation • play music in the background while the user is in a different application • fetch data over the network without blocking user interaction with an activity • Content Provider: DB or other data access • Broadcast Receiver: responds to system messages • Battery low
  • 14. Android UI • UI construction can be done in three ways: • Programmatic, like hand-coded Java desktop GUI construction • Declarative hand-written, like Java web UI construction • XML • Declarative with a GUI builder, like .NET UI construction • GUI builder generates the XML
  • 15. Programmatic UI package cs454.demo; import android.app.Activity; import android.widget.TextView; import android.os.Bundle; public class AndroidDemo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Activity is a subclass of context, so the TextView takes this as a parameter TextView tv = new TextView(this); tv.setText("Hello, CS454"); setContentView(tv); } }
  • 16. Manual Declarative UI main.xml Layout File: <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/textview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="@string/hello"/> strings.xml resource file: <?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello Again, CS454!</string> <string name="app_name">CS454 AndroidDemo</string> </resources>
  • 17. Manual Declarative UI Java class: package cs454.demo; import android.app.Activity; import android.os.Bundle; public class AndroidDemo extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
  • 18. What’s R? /* AUTO-GENERATED FILE. DO NOT MODIFY. This class was automatically generated by the * aapt tool from the resource data it found. It should not be modified by hand. */ package cs454.demo; public final class R { public static final class attr { } public static final class drawable { public static final int icon=0x7f020000; } public static final class id { public static final int textview=0x7f050000; } public static final class layout { public static final int main=0x7f030000; } public static final class string { public static final int app_name=0x7f040001; public static final int hello=0x7f040000; }
  • 19. UI With GUI Builder
  • 20. Android Event Handlers From the code file for the activity: Button ok = (Button) findViewById(R.id.button1); ok.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { CharSequence s = et.getText(); tv.setText("Welcome, " + s); } });
  • 21. Sams Teach Yourself Android™Application Development in 24 Hours (0321673352) FIGURE 3.2 Important callback methods of the activity life cycle. Copyright ©2010 Lauren Darcey and Shane Conder
  • 22. APIs for Android built-ins • Android OS ships with many built in apps • Web Browser • Google Maps • Navigation • Camera apps • Built in access for these as well as TTS and Voice Recognition, etc.
  • 23. My Project • • • • Goats and Tigers is a board game, which we implemented in Java in CS 460 last term. The objective in CS460 was to implement the minmax / alpha beta pruning algorithm for the automatic player, not to create a good UI My existing interface shows an ASCII art picture of the board and provides a JOptionPane menu of available moves I will develop an Android UI and use my existing backend code as much as possible
  • 24. • • • • References http://www.ibm.com/developerworks/opensource/library/os-androiddevel/ http://developer.android.com/resources/browser.html?tag=tutorial Conder and Darcey, Android Wireless Application Development, AddisonWesley, 2010 Conder and Darcey, Sams Teach Yourself Android Application Development in 24 Hours, Sams, 2010