Difference between revisions of "Android : Lab"

From CDOT Wiki
Jump to: navigation, search
(final)
Line 30: Line 30:
  
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_7/ Implement MenuItemSelected for update/delete contacts]
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_7/ Implement MenuItemSelected for update/delete contacts]
 
  
 
<u>Step 8. Add New Behaviour (Actions).</u>
 
<u>Step 8. Add New Behaviour (Actions).</u>
Line 36: Line 35:
 
Send email for a contact, etc. - demo in the lecture - March 21, 2011
 
Send email for a contact, etc. - demo in the lecture - March 21, 2011
  
<u>'''[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/ Here is the code for the steps described above]'''</u>
+
<u>'''[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/ Here is the code for the steps 1 - 7 described above]'''</u>

Revision as of 09:19, 19 March 2011

Here are few steps to guide you in the process of building an Android application:


Step 1. Build the First Activity.

ShowContacts Activity class

Step 2. Add Options Menu

Override onCreateOptionsMenu and onOptionsItemSelected almost empty

Step 3. Add a new activity: the Edit Activity.

Add Edit Activity & Create an Intent on OptionsItemSelected

Step 4. Create a DB class for using SQLite

Create an inner class of MyDbHelper that extends SQLiteOpenHelper

Step 5. Example of app failure trying to Write and Display data from DB.

Common errors in writing database adapters

Step 6. Fix Errors & Create Context Menu.

Implement MenuItemSelected - delete action

Step 7. Refactor SimpleDbAdapter.

Implement MenuItemSelected for update/delete contacts

Step 8. Add New Behaviour (Actions).

Send email for a contact, etc. - demo in the lecture - March 21, 2011

Here is the code for the steps 1 - 7 described above