Google Android Hello World! with Eclipse

January 19th, 2009

I am sharing with you people my experience for creating first Google Android Hello World! App.

I used Eclipse Classic 3.4.1 .

Installing Android Development Tools (ADT) Plugin

The first thing we need to do is to install Eclipse Plugin named Android Development Tools (ADT).

Its very simple to get this plugin installed. Just Open Eclipse IDE , move to Help>Software Update

A Software Updates and Addons window will appear with Available softwares. Now Click on Add Site button and add following link provided by google:

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

A new update link will appear put a check mark and click on Install. After installation the Eclipse IDE would require a restart.

Installing Google Android SDK

Now we are to Download Android SDK. It would be in zip format extract it first and then go to Eclipse, go to Window > Preferences. Here you will see the link for Android just after General. Click on Android link, you will see an input box for locating the Android SDK. Click on Browse and locate the extracted directory of Android SDK.

Now you are ready to go with Your First Hello World App.

Creating First Android Project

Create a new Project File >> New >> Project , a new wizard will appear to select project type,  select Android Project from Android and click Next from the wizard. Now you are to specify Project Name. A directory with this name would be created in yous system. Next is the Package Name the namespace actually where all your code will go.  Standard domain style is used for naming. Then Activity Name it is the name of the class that is created by ADT, the plugin we installed. And Application Name that will appear as title of your app. For example my settings are like:

Project Name: AndroidHelloWorld

Package Name: com.cmnajs.android

Activity Name: HelloWorld

Application Name: My Hello World App

Now Click on Finsh. If the Finish button is inactive make sure that your are not missing any information discussed above and the Pakage Name follow the domain style.

Running Hello World App

Now click on dropdown next to run button, select Run Configurations, Double Click on Android Application, it will create new configuration. At right side just browse the the application you just created and click on Run button. Here you will see your output.

  • Share/Save/Bookmark

Google , , , , , , ,

How can I get the name of the calling method in PHP

April 15th, 2009

I just fell in need of knowing the name of the method that is currently being called. After having a few minutes of unsuccessful searching i just thought of Late Static Binding and here the PHP Manual helped me.

Just do this inside your method;

echo __CLASS__; // For Class Name

echo __METHOD__; // For Method Name

Good Luck Developers.

  • Share/Save/Bookmark

PHP , , , , , ,

How to create Google Gadget Ads

March 12th, 2009

The APIs stuff is just making life easier.

Gadgets are like small applications we play with at different platforms.

Google already have gadgets platform available at iGoogle. Now google introduced Gadget Ads for Adwords. Now you can have more interactive ad campaigns with gadget ads.

For opensocial  gadget developers there is nothing to do. New developers needs little effort for.

First thing we need to sort out is the Gadget API.

Currently there are two versions of Gadget API. One is the Legacy and other is a “renamespaced” to gadgets.* an advanced one.

Gadget Ads are currently use the Lagacy Version of Gadget API. The documentation in previous link simplifies all about Gadgets.

Finally go through Gadgets Ads and move ahead to start yours.

Gadget Ads need a little alteration to Gadgets. We can use Gadget Ad Editor for writing, testing, validating and publishing Gadget Ads.

  • Share/Save/Bookmark

Google-API , , , ,

Browser’s Title Bar Tweak: Gmail Labs

February 26th, 2009