Week 10

Who wants beta testing?

Test Flight?

Project help

Week 9

Varun-need prototype/update

Carmen-Test Database Fix

Josh-Test Database Fix

Tony-Grid Pics only

Arnoldo-You are first

Euccas-Update

Marc-Update

Go over animal db line by line

Project deadlines

Then.....

Map App

Camera App

Android Icons

Generator

Android Device Art

//Log.v("update","UPDATE locations set photo= '" + picName + "' where _id =" + lastId);

THIS IS A DIALOG WITH BUTTONS THAT HAVE INTENTS

dialog.setTitle("Your picture has been saved");
TextView text = (TextView) dialog.findViewById(R.id.text);
text.setText("Where would you like to go?");
ImageView image = (ImageView) dialog.findViewById(R.id.image);
image.setImageResource(R.drawable.ic_launcher);
Button dialogButtonMap = (Button) dialog.findViewById(R.id.dialogButtonMap);
Button dialogButtonNote = (Button) dialog.findViewById(R.id.dialogButtonNote);

dialogButtonMap.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intentMap =new Intent(LocationPhoto.this,MainActivity.class);
startActivity(intentMap);
}

CHECK FIRST - THIS SHOWS AN IMAGE FROM A GIVEN PATH

String path = Environment.getExternalStorageDirectory().getPath();
File imgFile = new File(path + picName);//assuming picName is in the sqlite db
//works for all externally stored pics...good to save for later.
if(imgFile.exists()){
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
ImageView myImage = (ImageView) findViewById(R.id.locationpic);
myImage.setImageBitmap(myBitmap);
}
}

Awesome http://developer.android.com/training/notepad/index.html

Are the camera and google maps working?

Now for the google map marker

How android accesses form values

Storage

Shared Preferences

File System

SQlite

DB Browser

CRUD

Create: insert into locassessments (userid,sleep,energy) values (3,5,3);

Read: select * from locassessments where userid = 3;

Update:update locassessments set sleep = 8, energy = 4 where userid =3;

Delete:delete from locassessments where userid = 2;

http://developer.android.com/reference/android/util/LruCache.html

http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html

http://square.github.io/picasso/

Forms Example

A deliverable...and something different

Table Views and Table Rows (Layouts that often work with Databases)

Review of Camera,Maps, Notes

Maps Demo Issue: Two running projects cannot access the same library!

 

The difference between execSql and rawsql

Rawsql: Used to select statements and anything that returns data. Runs the provided SQL and returns a Cursor over the result set.

ExecSQL: Used when data is not returned...

Week 8

Trouble Shooting

Week 7

Your Homework

Storage, Storage, Storage

The difference between execSql and rawsql

Rawsql: Used to select statements and anything that returns data. Runs the provided SQL and returns a Cursor over the result set. ExecSQL: Used when data is not returned...

adb shell sqlite3 /data/data/com.package.name/databases/database_name.db {make raw sql statements} For offline access: adb pull /data/data/com.package.name/databases/database_name.db

SDK FOLDER

Code style

install google play on genymotion

Week 6

Slider Drawer from Android Hive

Most of you are going to start with a list or a map

 

Week 5

HOW TO LOG A VARIABLE

//Log.v("update","UPDATE locations set photo= '" + picName + "' where _id =" + lastId);

THIS IS A DIALOG WITH BUTTONS THAT HAVE INTENTS

dialog.setTitle("Your picture has been saved");
TextView text = (TextView) dialog.findViewById(R.id.text);
text.setText("Where would you like to go?");
ImageView image = (ImageView) dialog.findViewById(R.id.image);
image.setImageResource(R.drawable.ic_launcher);
Button dialogButtonMap = (Button) dialog.findViewById(R.id.dialogButtonMap);
Button dialogButtonNote = (Button) dialog.findViewById(R.id.dialogButtonNote);

dialogButtonMap.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Intent intentMap =new Intent(LocationPhoto.this,MainActivity.class);
startActivity(intentMap);
}

CHECK FIRST - THIS SHOWS AN IMAGE FROM A GIVEN PATH

String path = Environment.getExternalStorageDirectory().getPath();
File imgFile = new File(path + picName);//assuming picName is in the sqlite db
//works for all externally stored pics...good to save for later.
if(imgFile.exists()){
Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());
ImageView myImage = (ImageView) findViewById(R.id.locationpic);
myImage.setImageBitmap(myBitmap);
}
}

GenyMotion Update

JSON feed update

We'll cover more of the lifecycle and do the camera functionality

Dimensions

Templates

Action Bar and Support Library

Definitions

Camera App

http://developer.android.com/google/play-services/setup.html

http://developer.android.com/google/play-services/maps.html

week 5 materials

Week 4

public class CodeTester
{
    public static void main(String[] args)
    {
    	      String city = "San Diego";
    	      String area = "Olde Towne";
    	      String state = getState(city,area);
          System.out.println("Your location is " + state);
    }        
    
    
    
    public static String getState(String city,String area)
    {
    		 String livestate = null;
         if (city == "San Diego"){
         livestate =  area + ", " + city + ",  California" ;       	 
         }
         
         return livestate;	
    }
}
 



							

Activity assignment

Adding an intent to the original screen?

What about the action bar?

week 4 materials

Week 3

Non-Gradle Projects

Look at the homework

= -4; i--) System.out.print(50 - Math.abs(i) * 10 + " ");'; ?>

7. Football Side Line: Output 10 20 30 40 50 40 30 20 10 & Calculator assignment

Java Arrays, Functions, Exercises

Looking at Java Examples

Android: Activity Example

Activity Life Cycle

Activity Result

Explicit and Implicit Intents

 

Week 2

Extra Help Sessions

Where to look on Lynda.com

Calibrating a real device for testing

To access these settings, open the Developer options in the system Settings. On Android 4.2 and higher, the Developer options screen is hidden by default. To make it visible, go toSettings > About phone and tap Build number seven times. 

Focus on Java : Variables/Data/Operators/Conditionals/Loops/Scanner Classes

Please finish paperwork in google drive week 1: survey

Code Snippets in Android Studio: Highlight a piece of code -> Select Tools Menu -> Save as Live Template

After Break Android Examples/1 simple app

Week 1

Orientation 5:30-6:30 (rooms 117-118)

6:30-7:00 - Course intro (Text/Screencast channel/requirements)

7:00-7:30 The tools/resources (Eclipse/Java/Android SDK/developer.android.com/compileonlone.com/)

7:30-7:45 Quick break to get refreshed.

7:45-8:15- Install and tour Android Studio/Android ADTs (we'll need this to export some projects with gradle and run some java programs)

Migrating from eclipse

8:15-9:30- Running Java/Variables/Data/Operators/Conditionals/Scanner Classes Exercises and Homework

 

We will not need to learn Servlets or Swing or a few other java concepts as this is about developing for android

Week 1 materials