Wednesday, 28 November 2012

Hands On eclipse

As In my last post i mentioned,how to create a simple app for android which runs in the environment of eclipse.
Today, i will introduce you eclipse lookup like solution explore, toolbox an all good things which comes with eclipse IDE.

This image shows basic lookup of eclipse IDE, at starting point. 

Let me, tell you files are comes within your project folder,when you creating any android project...
Here, i have created a project with the name of Hello Workshop (File->New->other/Android Project) which is availble to us in project explore.

Every project contain similar structure as like,

Folder Structure.. -->
1) src
       As we know android app is runs on java source code. it means it posses classes. & for better way all classes are hold inside comman package. 
same way,src folder contain your package that you declare at the time of creating your android project(As here, i declared here{com.examples}) where my all classes about my project are available for me.


2) gen
     As, name indicates gen is dealing with generated resources.above image will help to clearify auto generated file named as which contain all resources specification that you cant modify.

3) Android 2.2
    It is the real magical part is where all supporting packages,classes,methods are bundled inside of it. which we are using in our whole project (in terms of classes,methods) as like 
   when i writing, 
                        class HelloWorkshop extends Activity

on my java class,it means
                     I am extending my class with Activity class which is wrtiten present inside of Android 2.2 packages. so i can use its all method of Activity
in my HelloWorkshop class.
                     Methods, like
onCreate(), onPause(),onResume(),............

4) bin
when we Running our app on emulator ,it creates an .apk (installation file).& that is located in bin folder.

5) res
  it contain all resourcses. in terms of images in drawable folder. it also has subfolder like layout,values.

    layout : it contain .xml file ,it has UI elements & their structure specification coded in xml file.
which looks like ..
 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android=""
    android:orientation="vertical" >

        android:text="@string/hello" />


6) AndroidManifest.xml 
         It contains,The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. 
for more information about   AndroidManifest.xml .

Monday, 26 November 2012

How to create simple app in Android

Hello Dear Freinds ,
                   Today i gonna teach you how to grip on the actual android apps development. we can develop an app on Windows, Linux as well as Mac OS.
 for being an android developer, you needs to have healthy command on Java.

*What is Java ?
   java is an object oriented programming language. it is stronger languages because it is stand on the three magical pillar, Encapsulation, Polymorphism, & Inheritance .

*Role of Java in android :
    Android applications are written in a well-respected programming language: Java.The Android application framework includes traditional programming constructs,such as threads and processes and specially designed data structures to encapsulate objects commonly used in mobile applications. Developers can rely on familiar class libraries, such as and java.text. Specialty libraries for tasks like graphics and database management are implemented using well-defined open standards like OpenGL Embedded Systems (OpenGL ES) or SQLite. Each Android application runs in a separate process, with its own instance of the Dalvik virtual machine (VM). Based on the Java VM, the Dalvik design has been optimized for
mobile devices.The Dalvik VM has a small memory footprint and multiple instances of the Dalvik VM can run concurrently on the handset.

if you are good in java,then android is waiting for you, lets play........

*Software Requirement for :
v                   *Java sdk
v                   *android sdk
v                   *ecilpse(helios is recommanded, now juno is availible on )
v                    *ADT pluggin

1Downloaappropriate file for your system from 
2)      Extract to desired location
3)      Run “SDK Setup.exe” (or the equivalent for your system)

Launch sdksetup.ext
a.       If you receive an error message stating “Failed to fetch url…” then you will have to force the Setup program to use http in lieu of https.

Got this error? Follow the steps.
i.      Close the “Refresh Sources” window
ii.      Cancel the “Choose Packages to Install” window
iii.      Select “Settings” from the left side of the “Android SDK and AVD Manager” window
iv.      Check the box labeled “Force https://… sources to be fetched using http://…”
v.      Click “Save and Apply”
vi.      Close and restart the SDK Setup program
4)      Choose the packages that you wish install

Select only the packages you need.
a.       If you are only interested in trying out the Android 2.0 Emulator
i.      Reject everything except “SDK Platform Android 2.3. API 9, revision 1” by selecting each item then selecting the Reject option
b.      If you plan to develop Android applications and Games, you may wish to Accept All
c.       Click “Install Selected”
5)      Allow the selected packages to download and install then close the “Installing Archives” window
6)      Create a new Android Virtual Device (AVD)

These are the settings to emulate the Moto Droid.
a.       Select “Virtual Devices” from the left side of the “Android SDK and AVD Manager” window
i.      Click “New”
ii.      Enter a Name
iii.      Choose a Target – Android 2.3
iv.      Enter a size for the emulated SD Card
v.      Choose a Skin
1.      To emulate current hardware such as the G1, MyTouch 3G, Hero, etc…
a.       Leave the default value
2.      To emulate the  Android 2.0
a.       Choose WVGA 854
3.      To emulate other devices
a.       Choose anything else
vi.      Click “Create AVD”
7)      Start your newly created Virtual Device

A successfully created AVD.
a.       Choose the Virtual Device from the list
b.      Click “Start…”
c.       Click “Launch”

Just click launch.
8)      Allow copious time for Emulator to start up

First startup will take a few minutes.
9)      Enjoy!

Android 2.0

Programming on Ecilpse
1.       First install eclipse on your machine with your desirable workspace.

2.       After that,(help->install new software
3.       Add  ADT-Pluggin (zip file) which you have downloaded before

Install all above,so eclipse can be actually getting ready for android development.
4.       Click on (window->preference->Android)  to, set target path for AVDs,that we have created .

Simple Hello Program.
1.create an Android Project in your project Explore.;with name of Simple_app.
(File->new->other->android project)

                2. choose target program as well as  assign package name.

3. Run program as (Android Application)
& output will look like as…………..

& enjoy ,Happy coding………….. J

Tuesday, 6 November 2012

Introduction to Android

Hello Friends,
               The mobile development community is at a tipping point. Mobile users demand more choice, more opportunities to customize their phones, and more functionality. Mobile operators want to provide value-added content to their subscribers in a manageable and lucrative way. Mobile developers want the freedom to develop the powerful mobile applications users demand with minimal roadblocks to success. Finally, handset manufacturers want a stable, secure, and affordable platform to power their devices. Up until now single mobile platform has adequately addressed the needs of all the parties.
             Enter Android, which is a potential game-changer for the mobile development community.An innovative and open platform,Android is well positioned to address the
growing needs of the mobile marketplace.
           Android Platform Differences

            Android is hailed as “the first complete, open, and free mobile platform.”
 * Complete: The designers took a comprehensive approach when they developed
the Android platform.They began with a secure operating system and built a
robust software framework on top that allows for rich application development
* Open: The Android platform is provided through open source licensing.
Developers have unprecedented access to the handset features when developing
* Free : Android applications are free to develop.There are no licensing or royalty
fees to develop on the platform. No required membership fees. No required
testing fees. No required signing or certification fees.Android applications can be
distributed and commercialized in a variety of ways.

What is Android? 
Android is a software platform and operating system for mobile devices, based on the Linux kernel, developed by Google and later the Open Handset Alliance. It allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries. Applications written in C and other languages can be compiled to ARM native code and run, but this development path is not officially supported by Google. The unveiling of the Android platform on 5 November 2007 was announced with the founding of the Open Handset Alliance, a consortium of 48 hardware, software, and telecom companies devoted to advancing open standards for mobile devices. Google released most of the Android code under the Apache license, a free-software and open source license.

 What is The Open Handset Alliance? 
Open Handset Alliance, is a consortium of several companies which include Google, HTC, Intel, Motorola, Qualcomm, T-Mobile, Sprint Nextel and NVIDIA, ... These companies which aim to develop technologies that will significantly lower the cost of developing and distributing mobile devices and services. The Android platform is the first step in this direction -- a fully integrated mobile "software stack" that consists of an operating system, middleware, user-friendly interface and applications.

I am Arrived on blogger

  Hello, friends
                 I am sushant Patekar. i am IT engineer. i love to play my hands on android development. i am spending my weekends with my friends & family.
                I l promise you i will contribute my knowledge with you.... so stay tunned & happy coding .....