ESW #1 - Developing For Android

14
Developing for Android a quick introduction by Alex Novac Zitec CTO & Founding Partner

description

Here are some info by Alex Novac from Zitec regarding Android development.

Transcript of ESW #1 - Developing For Android

Page 1: ESW #1 - Developing For Android

Developing for Android

a quick introductionby

Alex Novac Zitec CTO & Founding Partner

Page 2: ESW #1 - Developing For Android

INDEX

• Concerns regarding mobile platforms

• Developing applications for Android. How?

• The structure of an Android application. Activities

• Multitasking in Android

• Inter-application communication

• Background processing (Services)

• Notification system

Page 3: ESW #1 - Developing For Android

Concerns Regarding Mobile Platforms

• Battery Power Usage

• CPU performance

• Device Features - WiFi, GPS, Bluetooth etc.

• Internet Connection and its type (WiFi, 3G)

Page 4: ESW #1 - Developing For Android

Developing Applications for Android

• Android uses JAVA as a base programming language

• Google provides a very good Eclipse plugin

• The Android Development Toolkit

• http://developer.android.com - references, tutorials & help

Page 5: ESW #1 - Developing For Android

The Structure of an Android app

• Activities

• Services

• Broadcast receivers

• Content providers

Page 6: ESW #1 - Developing For Android

Activities

Activities are the main method of interaction between the user and the applications.

Page 7: ESW #1 - Developing For Android

Life cycle of Activities

• create

• start (restart)

• resume

• running

• pause

• stop

• destroy

Page 8: ESW #1 - Developing For Android

Activitiespublic class SharoidActivity extends Activity {

@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setTitle( "Sharoid" );                setContentView(R.layout.sharoid);}@Overridepublic boolean onCreateOptionsMenu(Menu menu) {   MenuInflater inflater = getMenuInflater();   inflater.inflate(R.menu.server_list_menu, menu);   return true;}@Overridepublic boolean onOptionsItemSelected(MenuItem item) {   switch ( item.getItemId() ) {   case R.id.friends:    Intent friends_intent = new Intent( this , SharoidListActivity.class );    friends_intent.putExtra( "list_ws" , fixRelativeURL( "/sharoid/get-friends" ) );    startActivity( friends_intent );    break;   }   return false;}}

Page 9: ESW #1 - Developing For Android

Multitasking in Android

• not a very smooth ride

• background processes can be killed by the OS

• main method is trough Services

• the intent-filter system helps interaction

Page 10: ESW #1 - Developing For Android

Inter-application communication

• call an Activity from another application• get a response form that Activity• extend your apps functionality

Page 11: ESW #1 - Developing For Android

Services

• background processing

• time-consuming operations

• monitoring

• media playback

Page 12: ESW #1 - Developing For Android

Notification system

allow background processes to communicate with the user.

Page 13: ESW #1 - Developing For Android

Final notes

• do a lot of checks

• understand the workflow of the Activities and Services

• use the standard settings manager

• read the coding and design guides

• don't bloat the application

• stay up to date with the information

Page 14: ESW #1 - Developing For Android

Questions and Answers

Follow us on twitter and don't hesitate to ask questions:

@acidtrix @zitec@sharoider

www.zitec.comwww.sharoid.com

http://bit.ly/dy4040