TvQuran
Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Saturday, April 7, 2012

The Way To Android : Lesson 3


The Way To Android : Lesson 3
-----------------------------
  • Agenda :
1 - Create your first android application
2 - Run your android application on simulator 
3 -  Examining your android project 

1 - Create your first android application
------------------------------------------------------
  1. open your eclipse ( with ADT plugin installed and SDK integrated )
  2. from file menu choose --> new project 








2 - Run Your android application 
------------------------------------------------------

  1. Right click on your android project 
  2. choose run as --> android application 
  3. after run your project 



3 - Examining your android project
------------------------------------------------------
when you create a new android application . you get some several items in the project root directory , including the following : 

  1. AndroidManifest.xml: An XML file that describes the application being built and what     components (activities, services, etc.) are being supplied by that application

  2. bin/:
    The directory that holds the application once it is compiled
  3. libs/:
    The directory that holds any third-party JARs your application requires
  4. res/:
    The directory that holds resources, such as icons, GUI layouts, and the like, that are packaged with the compiled Java in the application.
  5. src/:
    The directory that holds the Java source code for the application.



----------------------------------------------------------------------------------------------------

In addition to the preceding file and directories, you may find any of the following in Android projects :



  1. assets/: 
    The directory that holds other static files that you want packaged with the   application for deployment onto the device.
  2. gen/: 
    The directory in which Android’s build tools place source code that they generate
  3. build.xml and *.properties: 
    Files that are used as part of the Ant based command-line build process, if you are not using Eclipse
  4. proguard.cfg: 
    A file that is used for integration with ProGuard to obfuscate your Android code
----------------------------------------------------------------------------------------------------------------------------


The REST of Story 
--------------------------
Now we will explain some subdirectories you will  find under -----> res/:


  1. res/drawable/: For images (PNG, JPEG, etc.)
  2. res/layout/: For XML-based UI layout specifications
  3. res/menu/: For XML-based menu specifications
  4. res/raw/:
     
    For general-purpose files (e.g., an audio clip or a CSV file of account information)
  5. res/value/: For strings, dimensions, and the like
  6. res/xml/: For other general-purpose XML files you wish to ship

-----------------------------------------------------------------------------------------

One of the most important file in your application is the manifest file : It
 contain the basic info about your  application 


The element supplies :

  1. android:name for the class implementing the activity
  2. android:label for the display name of the activity
  3. <intent-filter> :
    child
    element describing under what conditions this activity will be displayed
  4. element sets up your activity to appear in the launcher, so users can choose to run it. As you’ll see later in this book, you can have several activities in one project, if you so choose.



Now we know how to create our first project and what is the project structure  



To Be Continued

read more...

Saturday, March 24, 2012

The Way To Android : Lesson 2


The Way To Android : Lesson 2
-----------------------------
  • Agenda :
1 - Install the editor (eclipse)
2 - Install the ADT( android development tool) plugin for eclipse
3 - Install Android SDK
4 - Setup Simulator 
Install The Editor ( eclipse )
from this link choose your Download Eclipse  you want to use .

Install The ADT for eclipse
1 -open your eclipse
2 - from help menu
3 - choose install new software 
4 - in the field of work with --> write this url 
                                 http://developer.android.com/sdk/eclipse-adt.html 
5 - press enter


Install The Android SDK

1 -go to 
                  http://developer.android.com/sdk/index.html 
2 - from help menu
3 - choose install new software 


Setup Simulator 

1 - to setup simulator you must : integrate eclipse with ADT And SDK you downloaded before 
2 - open your eclipse ( with ADT installed )
3 - from window menu --> choose preferences 


To Update your sdk version
  •           from window menu --> choose " Android  SDK  Manager "
  •           you will find a list of all available android platform 
  •           choose what you want to install 

After Update your sdk version 
  •         you can setup your simulator 
  •           from window menu --> choose AVD Manager ( Android Virtual Device 





To Start Simulator 
  •           After Creating AVD
  •            from window menu choose AVD Manager to start your emulator 


After press start you will see the following menu 
adjust your resolution if you want to resize your emulator 



After press launch button your android emulator will start and you can begin to develop your first android application :)) .





To Be Continued

read more...

Tuesday, March 20, 2012

The Way To Android : Lesson 1

The Way To Android : Lesson 1
-----------------------------

  • Agenda :
1 - Introduction
2 - Platform
3 - Software development
Introduction
  • What is Android ?
1 - A software platform and operating system for mobile devices

2 - Based on the Linux kernel

3 - Developed by Google and later the Open Handset Alliance 
       (OHA)

4 - Allows writing managed code in the Java language

5 - Possibility to write applications in other languages and 
      compiling  it to ARM native code (support of Google? No)

6 - Unveiling of the Android platform was announced 
                              on 5 November   2007  with the founding of OHA
  • What is the Open Handset Alliance (OHA) ? 
                 1 -  It's a consortium of several companies


                 2 -  Devoted to advanced open standards for mobile devices


                 3 -  Develop technologies that will significantly lower the cost of  
                        developing and distributing mobile devices and services




  • Android License
                 1 -  Android is under version 2 of The Apache Software License.
                         http://www.apache.org/licenses/LICENSE-2.0.html 


Platform
  • Hardware
 Android is not a single piece of hardware; it's a complete, end-to-end 
 software platform that can be adapted to work on any number of 
 hardware configurations. Everything is there, from the boot loader 
all the way up to the applications.


  • Operating System
  • Android uses Linux for its device drivers, memory management, process management, and networking.
  • The next level up contains the Android native libraries. They are all written in C/C++ internally, but you’ll be calling them through Java interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codecs, the SQL database (SQLite), and a native web browser engine (WebKit).
  • Dalvik Virtual Machine. Dalvik runs dex files, which are coverted at compile time from standard class and jar files. 

  • Network Connectivity
  • its support wireless communication using :
  • GSM mobile-phone technology
  • 3G
  • 802.11 Wi-Fi network


  • Security
  • Android is a multi-process system, in which each application (and parts of the system) runs in its own process. Most security between applications and the system is enforced at the process level through standard Linux facilities, such as user and group IDs that are assigned to applications. 
  • Additional finer-grained security features are provided through a "permission" mechanism that enforces restrictions on the specific operations that a particular process can perform, and per-URI permissions for granting ad-hoc access to specific pieces of data.
Android Hierarchy 

Software Development


  • Development requirements
  • Java
  • Android SDK
  • Eclipse IDE



To Be Continued


read more...