Friday, March 12, 2010

Configuration

The Good thing about Android's emulator is that you can set more than one version of Android.


I don't have time to write how to configure your IDE. So temporarily, I will direct you to another good article:
I will update this page later with enough information for Linux and Mac users.

Thursday, March 11, 2010

Make SDK tools easy to access

This is not required but highly recommended. You may not need it now but you will need it if you want to use your phone to test your apps in.

Some useful Android SDK tools are accessible through the command prompt(Terminal)

Normally, you will need to navigate to your Android SDK file before you could use any of SDK's commands. And you will need to do that every time you open the command prompt. This will become annoying specially when there are some files you want to send them to the phone or the emulator.

There is a way to access SDK tools no matter what directory you are in and here is how to do it:
Remember, you must memorize where did you unpack Android-sdk.
[your sdk directory goes here] should be replaced with your Android-sdk directory.

Linux:
  • open bash resource file (its either ~/.bash_profile or ~/.bashrc)
  • look for PATH= and change it to
    export PATH=${PATH}:[your sdk directory goes here]/tools
    or add it into the end of the file if you did not find.
Mac:
  • Do the same as Linux except that the bash resource file is .bash_profile and if it is not in the home directory, then you will need to create a new one.
Windows:
  • right-click on My Computer > Properties > Advanced [tab] > Environment Variables
  • double-click on Path > (under System Variables) and add:
    [your sdk directory goes here]/tools
Done! to sure, open the command prompt and type adb (Android Debug Bridge)
Remember, Linux and Mac are case sensitive.

Installation

In order to learn how to write Android apps, you need to use something to make it a little bit easier. Eclipse will be the best IDE for that. I personally prefer Netbeans but it does not have an official ADT Plugin like Eclipse does.
*This Works on Linux, Mac, and Windows

1. JDK
Java Development kit has all the required tools to write Java programs
Download then install it.

2. Eclipse
Eclipse is an IDE that lets you write Java programs easily. There are several packages you can chose. "Eclipse IDE for Java Developers" is more than enough. You can also choose "Eclipse IDE for Java EE Developers", "Eclipse for RCP/Plug-in Developers", "Eclipse Classic".
Download then install it.

3. Android SDK
Android Software Development Kit has many tools to make developing for android easier. This will make you able to use your phone and an emulator to test your programs.
Download then unpack and install it.

4. ADT Plugin for Eclipse
Android Development Tools will connect your Android SDK to your IDE. This will make Eclipse understands what your writing and help you in it and make you able to control everything in one place. The following table is taken from this page from Android official website.

Eclipse 3.5 (Galileo)
  1. Start Eclipse, then select Help > Install New Software.
  2. In the Available Software dialog, click Add....
  3. In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.

    In the "Location" field, enter this URL:

    https://dl-ssl.google.com/android/eclipse/

    Note: If you have trouble acquiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons).

    Click OK.

  4. Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
  5. In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.
  6. Restart Eclipse.
Configuring the ADT Plugin

Once you've successfully downnloaded ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

  1. Select Window > Preferences... to open the Preferences Panel (Mac OS X: Eclipse > Preferences).
  2. Select Android from the left panel.
  3. For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory.
  4. Click Apply, then OK.
Done
The next step is how to use and manage the tools which will be in the same video as well.

Tuesday, March 9, 2010

How to Program apps, game, and widgets for Android

Here, I will try to demonstrate how to start developing android apps.

Every app I make in here will be published in the android market in case somebody wanted to check it out and see how it functions or even use it.

First of all you need to install some software to get you started. It does not matter which OS you use. Personally, I use Linux operating system. Ubuntu 9.10 to be specific. Mac and Windows will do great as well.

Next Post: How to install (Java Development Kit), an IDE(Integrated Development Environment), and Android SDK(Software Development Kit)

Monday, March 8, 2010

What is Android?

Android is an operating system originally intended to target mobile market. Now, there are wide verity of electronics that runs Android like: netbooks, tablets, Voip phones, land phones, gameconsoles, MIDs, ... etc.

This platform is based on Linux Kernel. Linux is also another powerful operating system that is used in many business solutions and started to be adopted for personal everyday use as well.

Android was originally developed by Android inc. which was purchased by Google. Later, Open Handset Alliance was formed . This alliance contains 65 firms and is responsible for developing Android. However, the main company that develops android is Google.

02008-10-22The first Android device was released on October 22, 2008. It was T-mobile G1 (HTC Dream) in released in USA. By end of week 2009, there was 20 Android phone models worldwide.

The latest major update was 2.1 (Eclair) following 2 previous major updates: 1.5 (Cupcake) and 1.6 (Donut).

Android has so many features. Personally I believe it is the most flexible customizable mobile operating system.

Home screen:
You can set different kinds of short cuts not only for apps, you can also add contact Direct Dial, Direct message, Bookmarks, Music playlist, settings, and more. These are the standards. Apps -your app may be- can add more. You can also make folders and change background.
Totally unique and cool feature is widgets. Widgets are like small programs that you put in the home screen to talk as much space as the developer wants it to and change dynamically.

Market:
I uploaded an app to the market Yesterday. it was published with in minutes and about 300 people downloaded it with in 12 hours.
If you ever developed an app for the iPhone you will know what does this mean to you as a developer. iPhone app store take days or even months for an app to be approved an published. That in case apple did not decide to reject your app without giving any reasons. The story does not end in here. They can remove your app whenever they decide to do so. With Android market, the story is different and what is even better is that users can install other markets or even install your app directly with no problems.

There are so many features that I cannot cover here. Let me stop here so that I can start making tutorials.