Android

24
 Android - An Open Handset Alliance Project - Miguel Luís <[email protected]> http://www.mluis.com

Transcript of Android

   

Android- An Open Handset Alliance Project -

Miguel Luís<[email protected]>

http://www.mluis.com

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?

● What's Android?

● Installing the Android SDK

● Programming Example

● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?● What's Android?

● Installing the Android SDK

● Programming Example

● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?

● What's Android?● Installing the Android SDK

● Programming Example

● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?

● What's Android?

● Installing the Android SDK● Programming Example

● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?

● What's Android?

● Installing the Android SDK

● Programming Example● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?

● What's Android?

● Installing the Android SDK

● Programming Example

● Testing Android

   

Android- An Open Handset Alliance Project -

● Who's the Open Handset Alliance?● Mobile Operators

3

● Semiconductor Companies

● Handset Manufacturers

● Software Companies ● Commercialization Companies

“What would it take to build a better mobile phone?“

   

Android- An Open Handset Alliance Project -

● http://www.openhandsetalliance.com/

   

Android- An Open Handset Alliance Project -

● http://www.openhandsetalliance.com/

● Build a better phone for consumers

● Innovating in the open

● Making the vision reality

   

Android- An Open Handset Alliance Project -

● http://www.openhandsetalliance.com/

● Build a better phone for consumers● Cellphone, the biggest success product.

● Innovating in the open

● Making the vision reality

   

Android- An Open Handset Alliance Project -

● http://www.openhandsetalliance.com/

● Build a better phone for consumers

● Making the vision reality

● Innovating in the open● Openness favors Innovation

● Openness favors promptness to consumer's demands

   

Android- An Open Handset Alliance Project -

● http://www.openhandsetalliance.com/

● Build a better phone for consumers

● Innovating in the open

● Making the vision reality● Commitment to commercially deploy handsets and

services using Android

   

Android- An Open Handset Alliance Project -

● What's Android?

“What would it take to build a better mobile phone?“

● Software stack for mobile devices

● Android Software Development Kit

● Code: Java

   

Android- An Open Handset Alliance Project -

“What would it take to build a better mobile phone?“

● Application framework enabling reuse and replacement of components

● Dalvik virtual machine optimized for mobile devices

● Integrated browser based on the open source WebKit engine

● Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)

● SQLite for structured data storage

● Media support for common audio, video, and still image formats (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)

● GSM Telephony (hardware dependent)

● Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

● Camera, GPS, compass, and accelerometer (hardware dependent)

● Rich development environment including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE

   

AndroidAn Open Handset Alliance Project

● Programming

“What would it take to build a better mobile phone?“

Concerning issues when programming for embedded devices:

- hardware architecture- tight memory and CPU- small displays- soft-keyboards- stylus

Special attention:

- responsiveness- performance- *seamlessness

   

AndroidAn Open Handset Alliance Project

● Programming

“What would it take to build a better mobile phone?“

Android Framework forces a disciplined behavior on applications.

- Views to build (G)UIs'- Content providers- Resource Manager- Notification Manager- Activity Manager

   

AndroidAn Open Handset Alliance Project

● Application Components

“What would it take to build a better mobile phone?“

Key aspects.

- Activities- Intents- Services- Content Providers

   

AndroidAn Open Handset Alliance Project

● Activity: the core building block of an application

“What would it take to build a better mobile phone?“

package com.android.helloandroid;

import android.app.Activity;import android.os.Bundle;import android.widget.TextView;

public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, NEECT!"); setContentView(tv); }}

   

AndroidAn Open Handset Alliance Project

● Intents

“What would it take to build a better mobile phone?“

- Messages for the system to bind application components in the same or different application.

- An object holding abstract information

- Intent filters

Initiate a phone call:

startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + “234001010”)));

http://developer.android.com/guide/topics/intents/intents-filters.html [+]

   

AndroidAn Open Handset Alliance Project

● Services

“What would it take to build a better mobile phone?“

   

AndroidAn Open Handset Alliance Project

● New > Project > Android Project

“What would it take to build a better mobile phone?“

File Name Purpose

Your default launch activityContains an ID for all asset constants

Android Library/assets/res/res/drawable/ Directory for image files to be rendered by UI layoutres/layout Storage for all XML­style view layout filesres/values Location for strings and configuration files

File that describes your application to the operating system

YourActivity.javaR.java

Folder containing all Android SDK's filesMultimedia and other miscelaneous required filesBase directory for resourses used by the UI

AndroidManifest.xml

   

AndroidAn Open Handset Alliance Project

● The AndroidManifest.xml

“What would it take to build a better mobile phone?“

- Register Intents for the activities

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="sample.youractivity" android:versionCode="1" android:versionName="1.0.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".YourActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>

   

AndroidAn Open Handset Alliance Project

“What would it take to build a better mobile phone?“

OK Thanks Bye!Miguel Luís

http://www.mluis.com