Results 1 to 11 of 11

Thread: Building Your First APP for Android (Class 2 & 3)

  1. #1
    AbdulSalam98's Avatar
    AbdulSalam98 is offline Senior Member+
    Last Online
    30th January 2016 @ 03:24 AM
    Join Date
    01 Nov 2012
    Location
    Isalambad
    Gender
    Male
    Posts
    312
    Threads
    40
    Credits
    0
    Thanked
    30

    Arrow Building Your First APP for Android (Class 2 & 3)

    Dosto Kia hal hy umeed hy ap sub theek honge Aj me Android APK File Develop Krne Wale Topic ko Continue Karunga

    Building Your First APP for Android

    Running Your App


    If you followed the previous lesson to create an Android project, it includes a default set of "Hello World" source files that allow you to immediately run the app.

    How you run your app depends on two things: whether you have a real Android-powered device and whether you're using Eclipse. This lesson shows you how to install and run your app on a real device and on the Android emulator, and in both cases with either Eclipse or the command line tools.

    Before you run your app, you should be aware of a few directories and files in the Android project:

    AndroidManifest.xml
    The manifest file describes the fundamental characteristics of the app and defines each of its components. You'll learn about various declarations in this file as you read more training classes.

    One of the most important elements your manifest should include is the <uses-sdk> element. This declares your app's compatibility with different Android versions using the android:minSdkVersion and android:targetSdkVersion attributes. For your first app, it should look like this:

    <manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
    ...
    </manifest>


    You should always set the android:targetSdkVersion as high as possible and test your app on the corresponding platform version.

    src/
    Directory for your app's main source files. By default, it includes an Activity class that runs when your app is launched using the app icon.
    res/
    Contains several sub-directories for app resources. Here are just a few:

    drawable-hdpi/
    Directory for drawable objects (such as bitmaps) that are designed for high-density (hdpi) screens. Other drawable directories contain assets designed for other screen densities.
    layout/
    Directory for files that define your app's user interface.
    values/
    Directory for other various XML files that contain a collection of resources, such as string and color definitions.

    When you build and run the default Android app, the default Activity class starts and loads a layout file that says "Hello World." The result is nothing exciting, but it's important that you understand how to run your app before you start developing.

    RUN ON A REAL DEVICE

    If you have a real Android-powered device, here's how you can install and run your app:

    1- Plug in your device to your development machine with a USB cable. If you're developing on Windows, you might need to install the appropriate USB driver for your device. OEM USB Drivers document.
    2- Enable USB debugging on your device.
    * On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
    * On Android 4.0 and newer, it's in Settings > Developer options.

    Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

    To run the app from Eclipse:

    1- Open one of your project's files and click Run from the toolbar.
    2- In the Run as window that appears, select Android Application and click OK.

    OEM USB Drivers

    Installing USB Drivers

    Caution: You may make changes to android_winusb.inf file found inside usb_driver\ (for example, to add support for other devices), however, this will lead to security warnings when you install or upgrade the driver. Making any other changes to the driver files may break the installation process.


    Windows 7


    To install the Android USB driver on Windows 7 for the first time:

    1- Connect your Android-powered device to your computer's USB port.
    2- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
    3- Select Devices in the left pane.
    4- Locate and expand Other device in the right pane.
    5- Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
    6- Select Browse my computer for driver software and click Next.
    7- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
    8- Click Next to install the driver.

    Or, to upgrade an existing Android USB driver on Windows 7 with the new driver:

    1- Connect your Android-powered device to your computer's USB port.
    2- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
    3- Select Device Manager in the left pane of the Computer Management window.
    4- Locate and expand Android Phone in the right pane.
    5- Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
    6- Select Install from a list or specific location and click Next.
    7- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
    8- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
    9- Click Next to upgrade the driver.

    Windows XP


    To install the Android USB driver on Windows XP for the first time:

    1- Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Hardware Update Wizard.
    2- Select Install from a list or specific location and click Next.
    3- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
    4- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
    5- Click Next to install the driver.

    Or, to upgrade an existing Android USB driver on Windows XP with the new driver:

    1- Connect your Android-powered device to your computer's USB port.
    2- Right-click on My Computer from your desktop or Windows Explorer, and select Manage.
    3- Select Device Manager in the left pane.
    4- Locate and expand Android Phone in the right pane.
    5- Right-click Android Composite ADB Interface and select Update Driver. This will launch the Hardware Update Wizard.
    6- Select Install from a list or specific location and click Next.
    7- Select Search for the best driver in these locations; un-check Search removable media; and check Include this location in the search.
    8- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.)
    9- Click Next to upgrade the driver.


    Windows Vista


    To install the Android USB driver on Windows Vista for the first time:

    1- Connect your Android-powered device to your computer's USB port. Windows will detect the device and launch the Found New Hardware wizard.
    2- Select Locate and install driver software.
    3- Select Don't search online.
    4- Select I don't have the disk. Show me other options.
    5- Select Browse my computer for driver software.
    6- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter.
    7- Click Next. Vista may prompt you to confirm the privilege elevation required for driver installation. Confirm it.
    8- When Vista asks if you'd like to install the Google ADB Interface device, click Install to install the driver.

    Or, to upgrade an existing Android USB driver on Windows Vista with the new driver:

    1- Connect your Android-powered device to your computer's USB port.
    2- Right-click on Computer from your desktop or Windows Explorer, and select Manage.
    3- Select Device Manager in the left pane.
    4- Locate and expand ADB Interface in the right pane.
    5- Right-click on HTC Dream Composite ADB Interface, and select Update Driver Software.
    6- When Vista starts updating the driver, a prompt will ask how you want to search for the driver software. Select Browse my computer for driver software.
    7- Click Browse and locate the USB driver folder. (The Google USB Driver is located in <sdk>\extras\google\usb_driver\.) As long as you specified the exact location of the installation package, you may leave Include subfolders checked or unchecked—it doesn't matter.
    8- Click Next. Vista might prompt you to confirm the privilege elevation required for driver installation. Confirm it.
    9- When Vista asks if you'd like to install the Google ADB Interface device, click Install to upgrade the driver.


    OEM DRIVERS Download

    Acer
    Dell
    HTC
    Huawei
    Intel
    MTK
    ZTE
    Samsung



    Eclipse installs the app on your connected device and starts it.

    Or to run your app from a command line:

    1- Change directories to the root of your Android project and execute:
    ant debug
    Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute:
    adb install bin/MyFirstApp-debug.apk
    On your device, locate MyFirstActivity and open it.

    RUN ON THE EMULATOR


    To create an AVD:

    1- Launch the Android Virtual Device Manager:
    a- In Eclipse, click Android Virtual Device Manager from the toolbar.
    b- From the command line, change directories to <sdk>/tools/ and execute:

    android avd


    2- In the Android Virtual Device Manager panel, click New.
    3- Fill in the details for the AVD. Give it a name, a platform target, an SD card size, and a skin (HVGA is default).
    4- Click Create AVD.
    5- Select the new AVD from the Android Virtual Device Manager and click Start.
    6- After the emulator boots up, unlock the emulator screen.

    To run the app from Eclipse:

    1- Open one of your project's files and click Run from the toolbar.
    2- In the Run as window that appears, select Android Application and click OK.

    Eclipse installs the app on your AVD and starts it.

    Or to run your app from the command line:

    1- Change directories to the root of your Android project and execute:
    ant debug
    2- Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute:
    adb install bin/MyFirstApp-debug.apk
    On the emulator, locate MyFirstActivity and open it.
    Please Wait for Next Class....

    (An0nYm0uS b0y)

  2. #2
    Noman_Khan's Avatar
    Noman_Khan is offline Advance Member+
    Last Online
    29th September 2019 @ 01:05 PM
    Join Date
    06 Aug 2013
    Location
    @Itdunya.com
    Gender
    Male
    Posts
    6,793
    Threads
    142
    Credits
    79
    Thanked
    714

    Default

    Very Nice

  3. #3
    Eng Ahtasham's Avatar
    Eng Ahtasham is offline Advance Member+
    Last Online
    20th March 2015 @ 08:18 PM
    Join Date
    18 May 2013
    Location
    Mehrabpur
    Age
    31
    Gender
    Male
    Posts
    4,666
    Threads
    153
    Credits
    0
    Thanked
    627

  4. #4
    Khizar Hayyat's Avatar
    Khizar Hayyat is offline Senior Member+
    Last Online
    15th March 2017 @ 05:01 PM
    Join Date
    08 Dec 2010
    Gender
    Male
    Posts
    10,592
    Threads
    180
    Credits
    2,605
    Thanked
    725

    Cool


    Great Class Bro I Am Waiting For Next Class
    Allah Bada Hy

  5. #5
    GOODBOY1's Avatar
    GOODBOY1 is offline Advance Member
    Last Online
    6th September 2022 @ 09:43 PM
    Join Date
    20 Dec 2012
    Location
    Pakistan
    Gender
    Male
    Posts
    3,279
    Threads
    65
    Credits
    3,233
    Thanked
    288

    Default

    ایک تو انگلش میں لکھا ہے اور اوپر سے سکرین شوٹس بھی نہیں ہیں

  6. #6
    AbdulSalam98's Avatar
    AbdulSalam98 is offline Senior Member+
    Last Online
    30th January 2016 @ 03:24 AM
    Join Date
    01 Nov 2012
    Location
    Isalambad
    Gender
    Male
    Posts
    312
    Threads
    40
    Credits
    0
    Thanked
    30

    Unhappy

    Quote GOODBOY1 said: View Post
    ایک تو انگلش میں لکھا ہے اور اوپر سے سکرین شوٹس بھی نہیں ہیں
    Dear Screen Shots ki zarorat hoti to me zarror deta is me ek software use howa hy us pe jo coding or designing krni hy mene apko bta di hy......

  7. #7
    jaajax is offline Senior Member+
    Last Online
    8th January 2019 @ 07:41 PM
    Join Date
    29 Jul 2010
    Gender
    Male
    Posts
    497
    Threads
    18
    Credits
    179
    Thanked
    35

    Default Aoa

    gud

  8. #8
    King0 is offline Member
    Last Online
    6th March 2022 @ 01:42 PM
    Join Date
    30 Jun 2015
    Gender
    Male
    Posts
    925
    Threads
    86
    Credits
    2,517
    Thanked
    54

    Default

    kuch samag ni aya

  9. #9
    a_shaheer's Avatar
    a_shaheer is offline Advance Member
    Last Online
    20th November 2021 @ 02:49 PM
    Join Date
    30 Nov 2010
    Location
    Karachi
    Gender
    Male
    Posts
    1,063
    Threads
    128
    Credits
    222
    Thanked
    47

    Default

    Shandaar, thanks
    http://www.itdunya.com/signaturepics/sigpic171665_1.gif

  10. #10
    umairaleemps's Avatar
    umairaleemps is offline Junior Member
    Last Online
    15th June 2022 @ 02:07 PM
    Join Date
    29 Mar 2009
    Location
    Mirpur khas
    Age
    36
    Gender
    Male
    Posts
    25
    Threads
    15
    Credits
    1,230
    Thanked: 1

    Default

    very nyc

  11. #11
    fareez's Avatar
    fareez is offline Member
    Last Online
    4th June 2017 @ 12:01 AM
    Join Date
    24 Apr 2015
    Age
    29
    Gender
    Male
    Posts
    1,508
    Threads
    176
    Thanked
    44

    Default

    samaj nai aya yar

Similar Threads

  1. Index - MS Access Course By Lucky Noor
    By M-Qasim in forum Microsoft Access
    Replies: 151
    Last Post: 7th March 2021, 05:27 AM
  2. Index
    By M-Qasim in forum Short Hand From Zaara
    Replies: 17
    Last Post: 2nd November 2018, 02:44 PM
  3. Building Your First APP for Android
    By AbdulSalam98 in forum Android Zone
    Replies: 14
    Last Post: 29th January 2014, 06:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •