Thursday, January 10, 2013

3. Creating a New Simple Android Project

     So you have got a basic knowledge about Eclipse. Now we can go ahead to create a sample project and understand the basic file types,folders,XML file and Java file.  To create a New Android Project go to the toolbar and click File>New>Android Application Project (See the image below for details)



Now you will get a child window asking you to enter the project details.(see the image below) Give the Application Name as sample. Now the project name and Package name will be automatically filled up. No need to change these details. Note that your  project name should be unique so as to identify your application in Google Play (Where you can upload your Application). That is why it has chosen a reverse domain name. (TIP) But if your package name start with com.example, com.google or com.android they will not accept your file. For next project better you can give a starting name as "com.yourname" because it is to be unique in Google Play.
Anyway we are not changing other details for this project.Minimum Required SDK is the Minimum API level corresponding to the Android version. For example by setting a minimum API level of 8 and Android version 2.2 (named 'froyo'), your project will be able to run in the Mobile phone with earlier Android version ie. 'froyo'. The current Android version is Android 4.1 (Jelly Bean). Set it to the lowest as possible to make maximum compatibility.But if you do so you will not be able to use the advanced features incorporated in the latest versions. For this project don't change these fields.Also Leave other fields as it is.



On the next screen ie. configure project don't change anything click Next.

                     On the next screen you will be able to select an icon for your application(see the image below). This icon will be displayed in along with your application name in the phone if you install it in a phone. So chose a good icon, you can choose any photo by clicking browse and Eclipse will convert it in to an icon. You can select the shape of icon as square and circle. Click Next to continue.



Next screen is create activity. For this project select a "Blank Activity" (see the image below)



On the next screen you can create a new blank activity (see the image below). For this project no need to change the default name. But if you want can give a new name so that the file can be easily identified when different projects are simultaneously opened. If give a new name in the Activity Name, Layout name will be automatically changed. (Note that the Activity name is the name of the Java file and Layout name is the name of XML file, we will discus it later) Now click FINISH to create the project.



      Now your project is created with some files in the Package explorer and a Graphical Layout. Before starting you should know the different types of file and what is a Graphical Layout and XML Layout.

Now you can move to the NEXT CHAPTER

8 comments:

  1. Plz send a one app for me
    ......
    If you enter the pincode or city and District name then show the all hospitals in that particular area
    Then user select any particular hospital
    Then we trace the location of user and calculate distance between user and hospital and show this distance.......
    Plz Help me....

    ReplyDelete
  2. Nice to see you here.
    I really liked reading your message. What is wonderful and profound post you wrote here. Totally worth reading! Many things I learned from this article.

    DedicatedHosting4u.com

    ReplyDelete
  3. Trade Stocks, Forex, And Bitcoin Anywhere In The World: roboforex login Is The Leading Provider Of Software That Allows You To Trade On Your Own Terms. Whether You Are Operating In The Forex, Stock, Or Cryptocurrency Markets, Use roboforex login Software And Anonymous Digital Wallet To Connect With The Financial World.: roboforex login Is A Currency Trading Company That Allows You To Trade Stocks, Forex, And Cryptocurrency.

    ReplyDelete

Please give your valuable comments so as to know whether this blog is useful to you.You can also write helpful Android Development Syntax or Shortcuts or Tips.