esw #1 - developing for android
DESCRIPTION
Here are some info by Alex Novac from Zitec regarding Android development.TRANSCRIPT
Developing for Android
a quick introductionby
Alex Novac Zitec CTO & Founding Partner
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
Concerns Regarding Mobile Platforms
• Battery Power Usage
• CPU performance
• Device Features - WiFi, GPS, Bluetooth etc.
• Internet Connection and its type (WiFi, 3G)
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
The Structure of an Android app
• Activities
• Services
• Broadcast receivers
• Content providers
Activities
Activities are the main method of interaction between the user and the applications.
Life cycle of Activities
• create
• start (restart)
• resume
• running
• pause
• stop
• destroy
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;}}
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
Inter-application communication
• call an Activity from another application• get a response form that Activity• extend your apps functionality
Services
• background processing
• time-consuming operations
• monitoring
• media playback
Notification system
allow background processes to communicate with the user.
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
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