Tuesday, August 23, 2011

Android ActivityNotFoundException

This article briefly describes how you can solve an Android ActivityNotFoundException.

One type of error that you may encounter while programming in Android is the "activity not found" exception. This error can be particularly perplexing at first, because as you look through your source files you will see no compilation errors.

Screenshot of the logcat output showing an ActivityNotFound exception

The solution is to modify the manifest for the Android application. The manifest includes all sorts of information about the application, included a list of defined activities that run in the application.

Update the manifest to include information about the activity that it couldn't find, and run your program again. You should not experience this error anymore.

Listed below is an example of a line of code you can add to your manifest to declare an activity.

<activity android:name="CatalogActivity"></activity>

Monday, August 8, 2011

Source Code Available from Github

The source code for the shopping cart tutorial part one is now available for download through github.

Pasted below is a link. Enjoy, and look for more projects to appear on Github in the near future.

https://github.com/dreamdom/Shopping-Cart-Part-1

Thursday, July 7, 2011

Making a Full Screen Android App

This article demonstrates how to make an Android app that uses the full screen.

Why Make an App Fullscreen?

When you are dealing with portable devices you are usually dealing with limited screen real estate. This means that you have less room to display information to the user, and if your app chooses not to hide the title bar and notification bar you are left with even less space.

Personally, I think the title bar is kind of plain looking and generally not necessary. Usually you know what app you are currently using, and there isn't much space to make the title bar display anything interesting.

Screenshot of an Android App with Title Bar and Notification Bar

Tuesday, July 5, 2011

Change Anroid Emulator Soft Keyboard

This is a short tutorial that explains how you can change the Android Emulator soft keyboard to display in English.

For Some Reason...

At least twice when I have created Android Emulators, the system is set to display in English, but the soft keyboard that shows up contains Japanese characters. This can be a problem if you need to test specific inputs and don't know Japanese (sadly, I don't).

Have no, fear. This is a simple problem to fix.

If your Android Emulator Keyboard Looks Like This...

Emulator with Japanese soft keyboard

And you would like it to display an English based soft keyboard, then...

Android What Does DIP Stand For?

This article introduces the concept of DIPs for Android.

What Does DIP Stand For?

DIP stands for Density Independent Pixels. Density Independent Pixels are also abbreviated as DP.

One Density Independent Pixel is defined as one pixel on a 160 DPI (dots per inch) screen.

Sunday, July 3, 2011

Starting Another Android Activity With Intents

This tutorial will demonstrate how to start a second activity with Android and how to debug an Android ActivityNotFoundException.

Using Multiple Activities

Most Android projects involve using multiple activities. This tutorial will demonstrate how you can create start a second activity from your application, and pass along extras as well.

Create Two Layouts

First, we will create two different layouts, main.xml and secondactivity.xml

Screenshot of the main.xml layout

Friday, July 1, 2011

Back in Business (Kind Of) with MotoDev Studio

More Computer Woes

Unfortunately my main Android Development computer decided that it didn't want to turn on anymore. I think it is still a problem that can be fixed, perhaps by changing the power supply, but I figured it was time to move on and set up my laptop for Android Development.

As I was about to start downloading all the necessary components, I saw something called MotodevStudio which was a Motorola product. It is based off the Eclipse platform and makes the claim that it makes it easier to develop Android applications. I thought I would give it a try.

Setting up MotoDev Studio