1. Android SDK installation
Follow all the steps described at Google Android Development to install Android SDK and EclipseMake sure to run SDK Manager as administrator. Firewalls may create problem in getting tools and platforms from repository.
2. Developing First App ( Google's Official Training Link )
Instructions for Getting Started with Android Apps Development Using Eclipse
1. In Eclipse, File -> New -> Other will open a select wizard.
2. Configure Android Application and Project Settings
(a) Select Android Applications Project and click Next
(b) Specify the name of the Application
(c) Specify the name of the Project. Typically it can be same as Application name. It is used be Eclipse as a namespace.
(d) Select a version of the SDK API to build the app. This should have all the APIs directly accessed by the app.
(e) Select a version of the "Minimum Required SDK". This tells what is the lowest version of SDK API that the APP supports. Lower API diversifies the app to may devices whereas a high app gives more feature.
(f) Check the box for "Create custom launch Icon".
(g) Check the box for "Create Project in the Workspace".
(h) Click Next
3. Configure Launch Icon
Click Next to go to "Configure Launch Icon" wizard. Make the selections as per your liking. This icon appears for your app on the device.
4. Create Activity
An activity facilitates user interaction. It is a single, focused thing that a user can do. All activities interact with the user.
(a) If you choose not to check the "Create Activity" box, a default activity class is created. Otherwise, choose one of the two options: BlankActivity and MasterDetailFlow.
(b) Click Next.
5. Configure the Activity
(a) Specify an activity name which is also the name of the class created.
(b) Given the name of the layout
(c) Select a Navigation Type. It may require to change the SDK API version selected for build earlier.
(d) Leave the Hierarchical Button empty
(e) Title the activity
(f) Click Finish
6. Now we are ready to build and execute the first app. This also gives a foundation to make changes and develop advanced application
(a) Launch the Android Virtual Device Manager in Eclipse by selecting Window -> AVD Manager, or clicking the AVD Manager icon in the Eclipse toolbar.
(b) In the Android Virtual Device Device Manager panel, click New.
(c) Fill in the details for the AVD. Give it a name, a platform target, an SD card size, and a skin (HVGA is default)
(d) Click Create AVD.
(e) Select the new AVD from the Android Virtual Device Manager and click Start.
(f) After the emulator boots up, unlock the emulator screen.
(g) Close the AVD Manager.
(h) Run the application by either "right clicking on the project" and then selecting "Run As" -> "Android Application" or choose "Run" from menu and then click "Run". We should getting following output on the emulator
Further Reading:
1. Tutorial
No comments:
Post a Comment