Escolar Documentos
Profissional Documentos
Cultura Documentos
abelski
Introduction
What is Android?
Android is a software platform that delivers a complete set of software for mobile devices, including an operating system, a middle-ware and key mobile applications (Google).
Hello World
Start a new project in your Eclipse IDE. It should be an Android project.
Make sure you choose a meaningful application name. This is the name that will be shown in the application's title bar.
Hello World
We can now write our code.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello World!"); setContentView(tv); }
Hello World
In order to run this application we first need to create a configuration. Select 'Run' 'Run Configuration'. Make sure in the configuration window to select the android project you are now working on. Click 'Apply' and 'Run'.
When the user tries to run an application, the mobile telephone reads the application manifest file and starts running the activity \ activities that include the MAIN action with the LAUNCHER category.
The Intent
Activities are usually started with an intent. Each activity is defined using the <activity> element, that may include the <intent-filter> element defining the intent that starts it.
System Management
The life cycle of an android application is managed by the system, based on the users needs and the available resources.
The system own judgment might cause strange situations (e.g. the user might ask to start running the web browser and the system might prevent that). Current running activities will get the highest priority. Paused or stopped activities (on the other hand) are getting a lower priority and the system might shut them down if it needs their resources.
Separated Processes
Each application on the android platform runs in a separated process. Each process is running with its own virtual machine. The isolation of each application into a separated process allows the system to allocate different priorities to each one of them.
This way, the execution of high priority applications as getting an incoming phone call is ensured.
06/28/10
Android Fundamentals
abelski
06/28/10 2008 Haim Michael 1
06/28/10
Introduction
06/28/10
06/28/10
What is Android?
Android is a software platform that delivers a complete set of software for mobile devices, including an operating system, a middle-ware and key mobile applications (Google).
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
06/28/10
10
10
06/28/10
11
06/28/10
06/28/10
12
12
06/28/10
06/28/10
13
13
06/28/10
06/28/10
14
14
06/28/10
06/28/10
15
15
06/28/10
06/28/10
16
16
06/28/10
Hello World
Start a new project in your Eclipse IDE. It should be an Android project.
Make sure you choose a meaningful application name. This is the name that will be shown in the application's title bar.
06/28/10
17
17
06/28/10
06/28/10
18
18
06/28/10
Hello World
We can now write our code.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello World!"); setContentView(tv); }
06/28/10
19
19
06/28/10
06/28/10
20
20
06/28/10
Hello World
In order to run this application we first need to create a configuration. Select 'Run' 'Run Configuration'. Make sure in the configuration window to select the android project you are now working on. Click 'Apply' and 'Run'.
06/28/10
21
21
06/28/10
06/28/10
22
22
06/28/10
06/28/10
23
23
06/28/10
06/28/10
24
24
06/28/10
06/28/10
25
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
25
06/28/10
06/28/10
26
26
06/28/10
06/28/10
27
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
27
06/28/10
When the user tries to run an application, the mobile telephone reads the application manifest file and starts running the activity \ activities that include the MAIN action with the LAUNCHER category.
06/28/10
28
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
28
06/28/10
06/28/10
29
29
06/28/10
06/28/10
30
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
30
06/28/10
06/28/10
31
31
06/28/10
06/28/10
32
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
32
06/28/10
06/28/10
33
33
06/28/10
The Intent
Activities are usually started with an intent. Each activity is defined using the <activity> element, that may include the <intent-filter> element defining the intent that starts it.
06/28/10
34
The AndroidManifest.xml file is also used to define the permissions required by the application as well as the permissions granted to others.
34
06/28/10
06/28/10
35
35
06/28/10
06/28/10
36
36
06/28/10
06/28/10
37
37
06/28/10
06/28/10
38
38
06/28/10
System Management
The life cycle of an android application is managed by the system, based on the users needs and the available resources.
The system own judgment might cause strange situations (e.g. the user might ask to start running the web browser and the system might prevent that). Current running activities will get the highest priority. Paused or stopped activities (on the other hand) are getting a lower priority and the system might shut them down if it needs their resources.
06/28/10
39
39
06/28/10
Separated Processes
Each application on the android platform runs in a separated process. Each process is running with its own virtual machine. The isolation of each application into a separated process allows the system to allocate different priorities to each one of them.
This way, the execution of high priority applications as getting an incoming phone call is ensured.
06/28/10
40
40
06/28/10
41