Android Development and talk

4th Edition coming soon

leave a comment »

The Rough Cuts versions of the 4th Edition is available.

Rough Cuts

The code for the new edition is on Github.
No code for Hour 1.  Code for Hours 2-13 are up.

Code for new edition

Written by Carmen Delessio

April 21, 2015 at 2:57 pm

Posted in Uncategorized

Hour 2 – Understanding an Android Activity

with 2 comments

This is a correction to the code in Hour 2.

In Listing 2.12, we handle the result from a call to startActivityForResult().
The idea is that one Activity will handle data entered in a second Activity.

To show this, the code updates a TextView in the initial Activity.  Unfortunately, when I transcribed the code for the book I left out the initialization of that TextView.  The error is also in the code for download.  There were great tech reviewer and editors on this book.  This is my mistake and it will be corrected.

The required line that was dropped is:

      t = (TextView) findViewById (;

package com.bffmedia.hour2app;

import android.os.Bundle;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ActivityA extends Activity {
	TextView t;
    protected void onCreate(Bundle savedInstanceState) {
        Button b =  (Button)findViewById(;
        t = (TextView) findViewById (;
        b.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
            	Intent intent = new Intent(ActivityA.this, ActivityB.class);
                Bundle b = new Bundle();
            	b.putString("GREETING", "Hello");
            	intent.putExtra("BUNDLE", b);
            	intent.putExtra("STRING", "World!");
            	intent.putExtra("BOOLEAN", true);
            	intent.putExtra("INT", 5);

        Button getData =  (Button)findViewById(;
        getData.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
            	Intent intent = new Intent(ActivityA.this, ActivityC.class);
            	startActivityForResult(intent, 0);           	


    protected void onActivityResult(int requestCode, int resultCode, Intent data ) {
    	if (requestCode == 0 && resultCode == Activity.RESULT_OK){
    		String enteredData = data.getStringExtra("Data");
        super.onActivityResult(requestCode, resultCode, data);

    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;


Written by Carmen Delessio

December 2, 2013 at 3:31 am

New Book: Android Application Development in 24 Hours

leave a comment »

All new 3rd Edition of “Teach Yourself Android Application Development in 24 Hours” is      now available.

Updates and corrections will be made on this site.  Feel free to contact me or post    comments.

Sample Chapter and Source code are available.

Read Full Sample Chapter:  Hour 21, Android Media Basics: Images, Audio, and Video

Download Source code

Find it on Amazon


The sample chapter covers images, audio, and video.  The section on ImageViews has a discussion of scaleType and included the following images.

Figure 21.1

Base image for showing ScaleType (scaletest.png)

 Figure 21.2 ScaleTypes CENTER, CENTER_CROP, and CENTER_INSIDE

Figure 21.2

Written by Carmen Delessio

December 2, 2013 at 3:12 am

Second Screen Apps – Android Developer Meetup NYC

leave a comment »

Written by Carmen Delessio

March 15, 2013 at 3:54 am

Posted in Uncategorized

Google TV, Really?

leave a comment »

In the past few days, there have been several reports of Google opening retail stores. Every report says that they’ll sell Google TV’s in those stores. Is it a good time to start Google TV development? Yes, yes, I think so. Here are 3 quick reasons:

  1. Google TV is a software platform
  2. Google TV has a market for apps
  3. Google TV is a place to create 2nd Screen Apps – right now

In this article, I expand on these reasons and give a detailed example of creating a simple Flickr 2nd screen app using the Anymote protocol.

Why It’s Time to Start Developing Apps for Google TV

The example app shows recent Flickr Photo on your phone. When you select a photo, it is displayed on your Google TV.


To learn more, check out the book.

Sams Teach Yourself Google TV App Development in 24 Hours

Written by Carmen Delessio

February 20, 2013 at 5:42 am

BFF Photo & Video (Kindle Fire Edition)

leave a comment »

Your Facebook Photo & Video App.

Available on Amazon

Get the app in Amazon App Store

Written by Carmen Delessio

January 3, 2012 at 2:27 pm

Posted in Uncategorized

Adding the Aviary Mobile SDK to an Android App

with one comment

Aviary has made it pretty darn easy to add advanced photo editing features to Android apps.  Their Embeddable Photo Editor for Mobile was released today with support for both iOS and Android.    Check the developer site.

We added the editor to the BFFPhoto app.  More about the app at

The Aviary library includes effects, rotating, cropping, ability to draw or write on photos, and … more.

At the end of this post is a series of images showing edits on a photo that include adding the IndiGlow effect and adding text.

The Aviary sample code and documentation is very good.  The sample app has a single activity that lets the user pick and edit a photo. Since that will be the basic flow for many apps, it is a great head start for adding the photo editor to your app.

I recommend following the documentation, but at a high-level, you will need to:

  1. Add the Aviary library
  2. Add the Aviary external jar files
  3. Update your manifest file to include the Aviary Feather activity
  4. Incorporate the editor into your app

To make this easy for developers, Aviary has created the editor as an Activity.  It is called by adding an intent with the FeatherActivity and invoking the activity using “startActivityForResult.”

startActivityForResult( newIntent, ACTION_REQUEST_FEATHER );

The ACTION_REQUEST_FEATHER is handled in your onActivityResult method.  Using the result from the intent, you can access the edited photo.

BFFPhoto is an app that uploads photos to Facebook.  I added photo editing as part of the upload flow.  A user picks a photo and has the option to edit it before uploading.  The app saves the edited photo before uploading.  When to save photos is something to think about when adding an editor.

In BffPhoto, I used the default themes, but it is easy to customize the look and feel of the editor using standard Android themes.

Overall, this is a great ANDROID implementation of photo editing and should be familiar to Android developers.

Enjoy adding the Aviary Editor to your apps!

Unedited Photo

Basic Editor

Choose IndiGlow

Choose Text Tool

Add Text

Final Edited Photo - Ready for upload

Written by Carmen Delessio

September 13, 2011 at 4:14 pm

Posted in Uncategorized


Get every new post delivered to your Inbox.