The Fundamentals Hello World! A Real App

11⁄2 Hour Android Bootcamp Michiel Helvensteijn LIACS, Leiden University CWI, Amsterdam

Studievaardigheden, 30-10-2012

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals MarakanaTechTV’s Android Bootcamp

http://www.youtube.com/playlist?list=PLE08A97D36D5A255F

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Platform

Version Android 1.0, 1.1 Android 1.5 Android 1.6 Android 2.0, 2.0.1, 2.1 Android 2.2 Android 2.3, 2.3.3 Android 3.0, 3.1, 3.2 Android 4.0.2, 4.0.4 Android 4.1.1, 4.2

API Level 1, 2 3 4 5, 6, 7 8 9, 10 11, 12, 13 14, 15 16, 17

Michiel Helvensteijn

Nickname Android Cupcake Donut ´ Eclair FroYo Gingerbread Honeycomb Ice Cream Sandwich Jelly Bean

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Platform

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Main Building Blocks Activity

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Main Building Blocks Activity Service

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Main Building Blocks Activity Service Broadcast Receiver

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Main Building Blocks Activity Service Broadcast Receiver Content Provider

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Main Building Blocks Activity Service Broadcast Receiver Content Provider Intent Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Managers Media

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Managers Media Internet

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Managers Media Internet Phone

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Managers Media Internet Phone Bluetooth

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

Managers Media Internet Phone Bluetooth Notifications Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

MarakanaTechTV’s Android Bootcamp Android Platform Android Programming

The Fundamentals Android Programming

http://developer.android.com Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Create a new Android Application Project in Eclipse

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Explore the GUI Designer Activities Layouts Widgets Toolbars Properties Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Create and Run Hello World 0.1

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Explore App Anatomy (files) Manifest.xml Resources in res/ Java code in src/ (Libraries in libs/) (Assets in assets/) Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Implement Interactivity

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Hello World!

Implement Interactivity Hello World 0.2!

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Use Logcat; Live Logcat Log Activity Lifecycle TAG, you’re it!

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create a ‘Real’ App

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm Test; Log

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm Test; Log Create a Service that can trigger an alarm

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm Test; Log Create a Service that can trigger an alarm Test; Log

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm Test; Log Create a Service that can trigger an alarm Test; Log Connect the two with Intents

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Our Stages of Development Create an Activity for scheduling the alarm Test; Log Create a Service that can trigger an alarm Test; Log Connect the two with Intents Meh. . . It probably works. . .

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create an Activity for Scheduling the Alarm

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create an Activity for Scheduling the Alarm Message

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create an Activity for Scheduling the Alarm Message Frequency

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create an Activity for Scheduling the Alarm Message Frequency Period Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Activities

Create a Service that can Trigger an Alarm

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Services

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Services

Log Service Lifecycle

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Services

Try IntentService; it’s easier. . .

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Services

Call a Notification using NotificationManager

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Services

Schedule the Notification using AlarmManager

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Intents

Send our Alarm Information using Intent extras

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Intents

Do we have Time?

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Activities Services Intents

A Real App Intents

Do we have Time? Feature Ideas?

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp

The Fundamentals Hello World! A Real App

Conclusion

www.mhelvens.net

Michiel Helvensteijn

11⁄2 Hour Android Bootcamp