Search This Blog

13 September 2011

Why Eclipse?


Why is Eclipse the recommended IDE for Android applications? This is the reason why to use android application development in eclipse
  • Eclipse is one of the most fully featured, free, Java IDEs available. Eclipse is also very easy to use, with a minimal learning curve. This makes Eclipse a very attractive IDE for solid, open Java development.
  •  The Open Handset Alliance has released an Android plugin for Eclipse that allows you to create Android specific projects, compile them, and use the Android Emulator to run and debug them. These tools and abilities will prove invaluable when you are creating your first Android apps. You can still create Android apps in other IDEs, but the Android plugin for Eclipse creates certain setup elements—such as files and compiler settings for you. The help provided by the Android plugin for Eclipse saves you precious development time and greatly reduces the learning
  • There is so many Features of eclipse that makes it a strong IDE.
  • Simple Integration of Android SDK and ADT makes it more powerful.
  • Eclipse is also available for Mac and Linux. Having greater availability, on numerous operating systems, means that almost anyone can develop Android applications on any computer. 

It is recommended to use Eclipse Helios for the android application development.The Android SDK is easily accessible from the http://code.google.com/android page.


27 August 2011

Android First Program Extended







I think you had completed the installation of the android SDK in Eclipse environment. Now we move towards the first program. This is not ordinary HELLO WORLD program, but it is somewhat about an extended version of the “hello world”.

For that follow the following step to make a successful android application.





Step 1:

Start the eclipse; it is considered that you have installed an android SDK to eclipse. If not please see my blog on “Android Installation for Developers”.

 





 

·         Now go to file-> new.

·         And you see there are so many applications are there.

·         Choose “android project”. If you don’t find the android project then go to the “other” and the other window opened. In that window find “android” and select “android project”.

·         Now give the name to the project, like “MyFirst”.

·         Select the version of the android, it is that on which type of devices you are targeting for.

·         Then give package name, it is recommended that the package name should start with the “src”, for example “src.androidexample”.

And it will create some files. Which file contains what that I will tell you in my next blog.

 


 

Step 2:

Now go to quick look on which file you get. (in order to up to down)

·         The first file is of source. In that file the java class and java file are stored for your android application logic.

·         The second file is gen file. It contains the generated code of the android project. That will be done automatically by the eclipse.

·         The android 2.3.3 this file contains the jar file of the android that will help you to make android application.

·         The res file, it contain the resources of the layout and the values that are necessary for the GUI of an android application. The both the files are in XML formats.

 

Step 3:

Now first we make the android GUI. In that you just simply drag and drop the component in to the layout.

For that go to the layouts and in that file double click on main.xml,

Then it will open a layout for the android application.

 


 

Now drag and drop the button control in to the screen. And save it.

Step 3:

Now go to the “src” folder and click on it, then in that folder open the “myFirstActivity.java”

In that write the code like I had mention.


*************************************************************************************

package src.first;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MyFirstActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button button= (Button)findViewById(R.id.btnClick);
        button.setOnClickListener(new View.OnClickListener() {
                                               
                                                public void onClick(View v) {
                                                                // TODO Auto-generated method stub
                                                Toast.makeText(MyFirstActivity.this,"Hello World", Toast.LENGTH_LONG).show();               
                                                }
                                });
    }

}

*************************************************************************************


Step 4:

If you have not started your android AVD then it is recommended that start your AVD and then run your project.

If you don’t know how to start an android AVD then See my Blog “Android Installation for Developers”.

 

Step 5:

Right click on the Myfirst file and run as android application. And then the android project starts.

In that project when you click on the button it will show you the message (called toast) “Hello World”, and it is the Extended Hello World application in Android.

It look like this

 


 

 


Making an android application looks easy but i will show you how to make complex application in android in my next blogs.

Thanks for reading my blog. If you have any query please mail me and tell me the problem, I will try to resolve your problem.

21 August 2011

Android Installation for Developers



To develop android application you need an editor, android SDK, and ADT plugin for eclipse.
You will find it from


Eclipse the editor
Android SDK
ADT plugin for eclipse

 Download all this stuff from the internet and just do what I said.
Step 1: Installing an editor Eclipse
When you download eclipse helios it comes in a zipped format. Just extract it in the c:\program files. And then go to the eclipse folder find eclipse.exe and send it to desktop. It will create a shortcut(The silly thing.)
Step 2: Installing new software
Now start an eclipse from the desktop. Then you find a complete editor. Now go to the help from the menu bar of the eclipse. In the help you will find a “install new software”, Click on that.
Step 3: ADT installation
Now in the window of the install new software you see the add button like the image .
Click on that you find a new window in that window click on local and it will ask you for a path. Give the path of the ADT plugin and click ok.
Now click on the name of the software you find on the window (The Check box), and click next. Now it will take some time to complete. After it complete the installation click finish.
Step 4: Setting preferences
Now on the eclipse menu bar go to the window->preferences. In the preferences windows you can see the following window

Click on android and you can see the android preferences.
Step 5: setting the path of the Android SDK
Now extract the android SDK to direct c drive then in the android preferences window set the path like that.

And click ok.
Step 6: Starting a AVD manager
Now when you open the windows you can see the “Android SDK and AVD manager”. Click on that, then you can see the window like that.

Click on new and new window opened.

In that window you set the simulator of your android phone.
Name: you can give a name of the simulator.
Target: in that you can set on which type of device you are targeting the application, like on various version of android 1.5 to 3.3,
Size: you can give the maximum size of your application.
Skin: it will set you skin; if you are using a laptop or PC with a single screen the best option is choose HVGA.
No need to set properties. And click ok.
Now on that window click on your AVD and then start it will start you’re AVD, click launch and you can see the screen like





That is your android installation,
If you like my blog please comment, and give me suggestion to improve my blog its only for you guys.
Thanks a lot for reading my blog.

 http://www.eclipse.org/downloadsEclipse Download

16 August 2011

Android for Beginners


Android
The Android platform is not new for you now because everyone knows what android is and they just loved android. We talk from beginning.
What is android?
                Android is a first open, free, complete mobile platform. Or we can say it as a mobile phone Operating System, The operating System which are targeting on mobile phone hardware. The concept and platform was the brainchild of Android Inc., a small startup company from Palo Alto, California, that was acquired by Google in 2005. The aim of this operating system is to make an OS for mobile phone which is stable, open source (available for all), flexible, and easily upgradable OS.
                Google launch many versions of the android OS, like on 1.X to 2.X for mobile phone and 3.x for high end tablet computers.

What you want for android?
                Everyone wants to be android (who likes it.), for android you need a cell phone which has Android OS Pre-Installed. The mobile company like Samsung, Sony Ericson, HTC, and Motorola sell the Android mobile phone, it cost more than  50$, and bingo. Now you are android.
Why Android applications are free?
                The android is open source, and its applications are also open to all. Anyone who knows the coding can develop the application and put it on the Android market, which is created by Google for sharing application. And you can download the application from the android market. Some are application are not free, but you can take trial of that application.

07 August 2011

Video Chat


    Facebook has video chat and they have an agreement with Skype, but the chats are designed for one to one conversations. But for now it’s on trial base, it’s now unavailable, but in future it will be available for us.
    Google + has “Hangouts” allowing you to video chat with up to 10 people at once like conference. In a hangout you can also watch a video together and have a conversation about it. Hangout could be the new online collaboration tool. If you are part of a team that is not in the same place it could be a great way to keep people engaged during a call. Think about that how it seems to be all are together watching a movie. But to chat with video you have to take 3G connection, or high speed internet connection.
The both the website is good for the video chat. Its free and you can really enjoy with it. So, have a blast with video chat.

04 August 2011

Google Plus+


All of you know that google is a search giant and the facebook is a Social network giant. Now google is coming in the field of social networking, it is not a new thing, google is already in the field of social networking, but that time it comes with the new technology that might not be used by any other social networking website,
I had seen some of the new thing which I really like that. One of them is the concept of the “circle’. You can make circle it can be your collage group, school group or your job group, you can differentiate the people.
And what I like in G+ is the user interface, adding a person in the circle creates the visualization that you are actually adding him or her to a circle, its most effective use of ajax is awesome,
The G+ have the plus point that 75% of user uses the google as their search provider. And google provides the G+ as on Header, means you can see your notification while searching about the technology. You don’t need to open a new tab every time. You can add people in to circle from the header bar.
If the speed of G+ improves I will guaranteed google will beat the facebook. I feel that there issue about the lack use of cache at client side. At last I wish best of luck to G+.