Difference between revisions of "Android : Lab"

From CDOT Wiki
Jump to: navigation, search
Line 6: Line 6:
  
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_1/ ShowContacts Activity class]
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_1/ ShowContacts Activity class]
 
  
 
<u>Step 2. Add Options Menu</u>
 
<u>Step 2. Add Options Menu</u>
  
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_2/ Override onCreateOptionsMenu and onOptionsItemSelected] almost empty
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_2/ Override onCreateOptionsMenu and onOptionsItemSelected] almost empty
 
  
 
<u>Step 3. Add a new activity: the Edit Activity.</u>
 
<u>Step 3. Add a new activity: the Edit Activity.</u>
Line 17: Line 15:
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_3/ Add Edit Activity & Create an Intent on OptionsItemSelected]
 
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_3/ Add Edit Activity & Create an Intent on OptionsItemSelected]
  
Step 4. Define a Helper for SQLite  
+
<u>Step 4. Create a DB class for using SQLite</u>
  
 +
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_4/ create an inner class of MyDbHelper that extends SQLiteOpenHelper]
  
Step 5. Write and Display data from DB.
+
<u>Step 5. Example of app failure trying to Write and Display data from DB.</u>
  
 +
[https://zenit.senecac.on.ca/svn/ecl500/Lectures/trunk/LAB_Android_Example_Steps/Step_5/ common errors in writing database adapters]
  
 
to be continued
 
to be continued

Revision as of 07:40, 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

to be continued


Here is the code for the steps described above