Friday, March 9, 2012

Creating a Simple Custom Android View

This tutorial will show you how to create an extremely simple custom view that draws a red border, and add this view to a layout.


1. Why Create a Custom View?

You may be wondering why you would ever want to create a custom view. Android comes with many views already, and these views follow behaviors that the user expects and has grown accustomed to (buttons, check boxes, text inputs). These views are fine and work great, but sometimes they do not provide all the functionality that your apps requires, or you may simply wish to build a more customizable component.

Thursday, February 23, 2012

Debug Certificate Expired

When you are building your android applications you don't really want to have to worry about signing your app before you install it on a device just for testing purposes.

Thankfully, the Android Development Tools will take care of this for us, and when you run your application from Eclipse, the Android plug in will automatically take care of signing the app with a debug certificate.

However, if you have been developing Android apps for more than a year, you may have run into the following problem.

Error generating final archive: Debug Certificate expired on...


Saturday, February 11, 2012

How to Modify the AndroidManifest

In previous tutorials we have reminded you to modify the manifest file and we have gotten a lot of questions about how to do it. Here is the general answer.

As you know, our tool of choice (IDE) to create Android apps is Eclipse.
So here is how you can do it step by step. [Note: If you don't use Eclipse then you just have to modify the AndroidManifest.xml file in your application]


1. In your package explorer tab (In the image to the left you) click on the AndroidManifest.xml
2. In the main window you will see a set of tabs at the bottom  (blue in the image. We find it easier (but also more prone to mistakes) to modify the .xml file directly, so click on that tab.
3. Now, all you have to do is update it to your needs. The most common problem is to change the activity, so in this example you can swap <activity ..... > .... </activity>  with the new one.

In short, two of the most important tags are:

  • Activity - describe the different activities your app contains and settings for them
  • Permissions - describe which features your application wishes to use that are not normally included (internet access for example)

If you want to know more about the manifest and what each of the fields means you can find more information  from the official android documentation here.

We hope this helps, we will be bringing new material soon if you have any suggestions then write a comment, send us an email or find us on twitter.

Tuesday, February 7, 2012

Pardon the Dust

Ahhh, We meet again.

Sorry for abandoning the blog for a few months, computer problems coupled with busy schedules are our excuse. However, we have exciting news: 

We are about to launch an improved Android Drom blog.

What does this mean for you?

* Update to all our old tutorials which includes putting all the code in github
* New tutorials just for you
* Help sessions - specific hours where you can ask and we'll answer

We are really sorry if we didn't reply to your email but it is really hard to try solving all the problems with the your code. Our goal while posting these tutorials is to provide a point of reference. However, in these help sessions that we are planning on hosting you can expect real-time answers to your questions.

Finally, we are doing this as a hobby, so please bear with us, and if you like what you see and would like to show your appreciation, consider buying us a cup of coffee so we can keep going.

Sincerely, 
The Android Dom team.

Monday, September 26, 2011

Finally an Android Tablet Worth Buying?

I'm not going to lie, I have been pretty disappointed with most of the Android tablets that have come to the market so far.

The most important factor to me, and too a lot of other people I am sure, has been the price point, and Android tablets have been too expensive for me to consider buying.

But perhaps it will in the very near future.

Rumors are flying around that Amazon will finally release their own Android powered tablet on Wednesday, and that it could be priced as low as $250!

See this article below about how even Apple might be scared about the Amazon tablet.


http://www.foxnews.com/scitech/2011/09/26/amazons-wednesday-tablet-launch-threat-to-apples-ipad-analysts-say/

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