Saturday, February 26, 2011

Android Art

While perusing the internet I came across this image and I thought I would share with you.

If you follow this link: [] you can see the rest of the series, it is pretty cool  in my opinion. And here is the blog of the artist:  []

Wednesday, February 23, 2011

Quick Tip: Simple Debugging Android Apps with Logcat

Simple Debugging

The Android Debug Bridge (adb) is included as part of the Android SDK. One of the most powerful tools it features is the ability to view log messages from the Android Operating System and various android applications.

As part of setting up the Android sdk, you should already have ADB in your path variable. To use logcat, simply open up a terminal window, and type the following

adb logcat

You are now presented with continuously updating output of the most recently logged data. Pressing Ctrl+C will exit the logcat application.

Screenshot of adb logcat running in Windows

If an application is crashing, force closing, often times you can use the logcat information to find out what went wrong.

If you want to log custom information for your app, just use the following code.

Log.w(String tag, String message)

and be sure to include the following import at the top of your file:

import android.util.Log;

One Final Tip

Sometimes it is easy for a message to get lost in the log. If you really want to make a message stand out, you can surround it by several newlines. The following code shows this technique

Log.w("MyAPP", "\n\n  Important message \n\n");

Monday, February 14, 2011

Valentine's Day

Happy Valentine's Day to all the Android Drom readers out there. We know that many people believe this is just a hallmark holiday, and in some ways it is. So we don't get all mushy buying flowers and chocolates, but we do cherish the friendships we have made and those people who are there for us no matter what.

But I'm sure most of you are here for the tutorials, and we are glad to inform you that we are working on new ones and you should be seeing them soon. Again, if you have any suggestions as to what you would like to see next simply let us know and we'll work on that.

Have a great week,
The Android Dom Team

Monday, February 7, 2011

Android Shopping Cart Tutorial

In this tutorial you will learn how to create a simple app that features several products which can be placed in a shopping cart. You can then view the contents of the shopping cart and remove items that you no longer want.

Update - after following this tutorial, be sure to check out part 2 and also check out part 3.

Creating a Shopping Cart for Android

A common problem that arises when developing Android applications is figuring out how to pass information from Activity to Activity within the Android application. This problem can be solved in two ways. For passing small amounts of information, you can put extras in the Intent that gets passed along to create the activity. For managing a larger, more complex amount of information the use of static variables is recommended.

Through this tutorial we will create a simple shopping cart. At the end of the tutorial, there are several suggestions for improving the shopping cart. Some of these suggestions may be included in a future tutorial.

Screenshot of the finished Shopping Cart