How To Developing Android Application in hindi
Part-01
Activity
Activity is the presenter of a single screen in the application. It is the only one who has certain abilities, like displaying Views, menus, alerts and notifications. It also has the ability to open a new Activity, which means opening a new screen.Activity is a class which derives from android.app.Activity.An application needs to have at least one Activity.All Activities must be declared in the manifest file.
View
A view is a single user interface element. Its responsibilities include drawing on a canvas and handling user events.
Some Views can contain other Views, these are called view groups.
A View is a class which derives from android.view.View.
There are already many existing views. The developer can use them or create his own customized view by extending any of them.
Intent
Intent is the negotiator between two activities or between two applications. It gives the ability to pass messages and data between the two entities.
When writing applications for mobile, Intent is very handy, since it gives access to a lot of the OS services like opening the camera, a browser, displaying notifications and so on.
Service
A Service is an application which has the ability to run in the background without displaying any user interface.
A Service is a class which derives from android.app.Service.
All Services must be declared in the manifest file.
Environemnt Installation
Option 1 - Eclipse Plugin
If you have an Eclipse installed and you wish to continue working with it, you can do so by installing the Android Eclipse Plugin.
http://developer.android.com/sdk/eclipse-adt.html
Option 2 - Android Development Tools (ADT) Bundle
The ADT Bundle is a complete package of Eclipse with Android plugin and Android SDK with all the extra tools. So this is probably a good options if you are starting from scratch.
http://developer.android.com/sdk/installing/bundle.html
Option 3 - Android studio
If you like inteliJ morte than a Eclipse, than this is probably the best option for you. This one also includes every thing the ADT bundle includes.
http://developer.android.com/sdk/installing/studio.html
Creating a project
In Eclipse: Select File > New > Android Project.
In Android Studio: Select File > New Project.
Enter the project properties:
Click on 'Next' twice
Click on 'Finish'.
An Android project structure
Manifest file
AndroidManifest.xml defines the Android application project. It defines the attributes, activities, versions, permissions, and other parameters of the application.'src' folder
As any Java project, this folder holds all the Java sources and packages.'res' folder
Holds any local resources of the application:*Note: files in the res folder may be modified for optimization purposes.
SDK jar
Holds the android.jar which is different from versions of the SDK.'gen' folder
Contains the R class which is a class that is automatically generated by the Eclipse plugin and gives access to the projects resources.'assets' folder
Holds other raw resource files such as movies or sound files. By default this folder is not created. These resources will not be modified.Creating Android Virtual Device (AVD)
The developer can test his applications on an emulator which comes along with Android SDK.But first the developer has to define a virtual device which suits his needs.
To create an AVD:
In Android Studio: select Tools > AVD Manager
or click the AVD Manager icon from the toolbar.
Signing and generating jars
Android applications as other applications are zipped to jar files. The only difference is that Android jar files have a different extension - .apk.All application jars have to be signed before they are installed.
Please follow instructions in:
Views
Creating and adding a new View to a LayoutXML example - Adding to a view in a layout xml file
Comments
Post a Comment