android and its significance

Upload: zybotechsolutions

Post on 05-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 ANDROID and Its Significance

    1/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    Android Application Development Training Tutorial

    For more info visit

    http://www.zybotech.in

    http://www.zybotech.in/http://www.zybotech.in/http://www.zybotech.in/
  • 7/31/2019 ANDROID and Its Significance

    2/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    ANDROID

    Android is a software stack for mobile devices that includes an operating system, middlewareand key applications.

    AndroidManifest.xml, an XML file describing the application being built and what

    componentsactivities, services, etc.are being supplied by that application

    build.xml, an Ant1 script for compiling the application and installing it on the device

    default. properties, a property file used by the Ant build script

    bin/ holds the application once it is compiled

    libs/ holds any third-party Java JARs your application requires

    src/ holds the Java source code for the application res/ holds resources, such as icons, GUI layouts, and the like, that get packaged with the

    compiled Java in the application

    assets/ holds other static files you wish packaged with the application for deployment onto

    the device

    Features

    Application framework enabling reuse and replacement of components Dalvik virtual machine optimized for mobile devices Integrated browser based on the open sourceWebKitengine Optimized graphics powered by a custom 2D graphics library; 3D graphics based on the

    OpenGL ES 1.0 specification (hardware acceleration optional)

    SQLite for structured data storage Media support for common audio, video, and still image formats (MPEG4, H.264, MP3,

    AAC, AMR, JPG, PNG, GIF)

    GSM Telephony (hardware dependent) Bluetooth, EDGE, 3G, and WiFi (hardware dependent) Camera, GPS, compass, and accelerometer (hardware dependent) Rich development environment including a device emulator, tools for debugging,

    memory and performance profiling, and a plugin for the Eclipse IDE

    Activity lifecycle

    An activity, generally speaking, is in one of four states at any point in time:

    Active: The activity was started by the user, is running, and is in the foreground. This is

    what youre used to thinking of in terms ofyour activitys operation.

    Paused: The activity was started by the user, is running, and is visible, but a notification

    or something is overlaying part of the screen. During this time, the user can see your

    activity but may not be able to interact with it. For example, if a call comes in, the user

    http://webkit.org/http://webkit.org/http://webkit.org/http://webkit.org/
  • 7/31/2019 ANDROID and Its Significance

    3/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    will get the opportunity to take the call or ignore it.

    Stopped: The activity was started by the user, is running, but it is hidden by other activities

    that have been launched or switched to. Your application will not be able to present

    anything meaningful to the user directly, only by way of a Notification.

    Dead: Either the activity was never started (e.g., just after a phone reset) or the activity was

    terminated, perhaps due to lack of available memory.

    Intent filters

    An Intent object can explicitly name a target component. If it does, Android finds that

    component (based on the declarations in the manifest file) and activates it. But if a target is

    not explicitly named, Android must locate the best component to respond to the intent. It

    does so by comparing the Intent object to the intent filters of potential targets. A component's

    intent filters inform Android of the kinds of intents the component is able to handle.

    User Interface

    In an Android application, the user interface is built usingViewandViewGroupobjects.

    Widgets

    A widget is a View object that serves as an interface for interaction with the user. Android

    provides a set of fully implemented widgets, like buttons, checkboxes, and text-entry fields, so

    you can quickly build your UI. Some widgets provided by Android are more complex, like a

    date picker, a clock, and zoom controls.

    XML-Extensible markup language.

    Creating Menus

    Menus are an important part of an application that provide a familiar interface for the user to

    access application functions and settings. Android offers an easy programming interface foryou to provide application menus in your application.

    Android provides three types of application menus:

    Options Menu

    The primary menu for an Activity, which appears when the user presses the device

    MENU key. Within the Options Menu are two groups:

    Icon Menu

    http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ViewGroup.htmlhttp://developer.android.com/reference/android/view/ViewGroup.htmlhttp://developer.android.com/reference/android/view/ViewGroup.htmlhttp://developer.android.com/reference/android/view/ViewGroup.htmlhttp://developer.android.com/reference/android/view/View.html
  • 7/31/2019 ANDROID and Its Significance

    4/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    The menu items visible at the bottom of the screen at the press of the MENU key. It

    supports a maximum of six menu items. These are the only menu items that support

    icons and the only menu items that do notsupport checkboxes or radio buttons.

    Expanded Menu

    The vertical list of menu items exposed by the "More" menu item in the Icon Menu.

    When the Icon Menu is full, the expanded menu is comprised of the sixth menu item

    and the rest.

    Context Menu

    A floating list of menu items that appears when the user performs a long-press on a

    View.

    Submenu

    A floating list of menu items that the user opens by pressing a menu item in the Options

    Menu or a context menu. A submenu item cannot support a nested submenu.

    Notifying the User

    Topics

    1. Creating Toast Notifications2. Creating Status Bar Notifications3. Creating Dialogs

    Several types of situations may arise that require you to notify the user about an event that

    occurs in your application. Some events require the user to respond and others do not. For

    example:

    When an event such as saving a file is complete, a small message should appear toconfirm that the save was successful.

    If the application is running in the background and needs the user's attention, theapplication should create a notification that allows the user to respond at his or her

    convenience.

    If the application is performing work that the user must wait for (such as loading a file),the application should show a hovering progress wheel or bar.

    Each of these notification tasks can be achieved using a different technique:

    AToast Notification, for brief messages that come from the background.

    http://developer.android.com/guide/topics/ui/notifiers/toasts.htmlhttp://developer.android.com/guide/topics/ui/notifiers/toasts.htmlhttp://developer.android.com/guide/topics/ui/notifiers/notifications.htmlhttp://developer.android.com/guide/topics/ui/notifiers/notifications.htmlhttp://developer.android.com/guide/topics/ui/dialogs.htmlhttp://developer.android.com/guide/topics/ui/dialogs.htmlhttp://developer.android.com/guide/topics/ui/notifiers/index.html#Toasthttp://developer.android.com/guide/topics/ui/notifiers/index.html#Toasthttp://developer.android.com/guide/topics/ui/notifiers/index.html#Toasthttp://developer.android.com/guide/topics/ui/notifiers/index.html#Toasthttp://developer.android.com/guide/topics/ui/dialogs.htmlhttp://developer.android.com/guide/topics/ui/notifiers/notifications.htmlhttp://developer.android.com/guide/topics/ui/notifiers/toasts.html
  • 7/31/2019 ANDROID and Its Significance

    5/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    AStatus Bar Notification, for persistent reminders that come from the background andrequest the user's response.

    ADialog Notification, for Activity-related notifications.This document summarizes each of these techniques for notifying the user and includes linksto full documentation.

    Toast

    A toast notification is a message that pops up on the surface of the window. It only fills the

    amount of space required for the message and the user's current activity remains visible and

    interactive.

    Status Bar Notification

    A status bar notification adds an icon to the system's status bar (with an optional ticker-text

    message) and an expanded message in the "Notifications" window. When the user selects the

    expanded message

    Activities

    The building block of the user interface is the activity.

    onCreate(BundlesavedInstanceState)

    Called when the activity is starting

    Content Providers

    Content providers provide a level of abstraction for any data stored on the device that is

    accessible by multiple applications.

    Intents

    Intents are system messages, running around the inside of the device, notifying applications of

    various events, from hardware state changes, to incoming data, to application events.

    The root element needs to declare the Android XML namespace:

    xmlns:android=http://schemas.android.com/apk/res/android

    android.preference

    Provides classes that manage application preferences and implement the preferences UI.

    http://developer.android.com/guide/topics/ui/notifiers/index.html#StatusBarhttp://developer.android.com/guide/topics/ui/notifiers/index.html#StatusBarhttp://developer.android.com/guide/topics/ui/notifiers/index.html#StatusBarhttp://developer.android.com/guide/topics/ui/notifiers/index.html#Dialoghttp://developer.android.com/guide/topics/ui/notifiers/index.html#Dialoghttp://developer.android.com/guide/topics/ui/notifiers/index.html#Dialoghttp://developer.android.com/reference/android/preference/PreferenceActivity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/os/Bundle.htmlhttp://developer.android.com/reference/android/os/Bundle.htmlhttp://developer.android.com/reference/android/os/Bundle.htmlhttp://schemas.android.com/apk/res/androidhttp://schemas.android.com/apk/res/androidhttp://schemas.android.com/apk/res/androidhttp://developer.android.com/reference/android/os/Bundle.htmlhttp://developer.android.com/reference/android/preference/PreferenceActivity.html#onCreate(android.os.Bundle)http://developer.android.com/guide/topics/ui/notifiers/index.html#Dialoghttp://developer.android.com/guide/topics/ui/notifiers/index.html#StatusBar
  • 7/31/2019 ANDROID and Its Significance

    6/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    android.provider

    Provides convenience classes to access the content providers supplied by Android.

    A class for turning a byte stream into a character stream. Data read from the source inputstream is converted into characters by either a default or a provided character converter. The

    default encoding is taken from the "file.encoding" system

    property. InputStreamReader contains a buffer of bytes read from the source stream and

    converts these into characters as needed. The buffer size is 8K.

    Current Project: Global Online Mobile Share Trading System(GOM Trade)

    1) Username2) Membership password3) Trading password4) Login5) Cancel6) Forgot password7) Change password8) Offline mode9) New user

    Projects:

    Drawing PanelDevelopment of an application using Android for drawing .In this we can able to draw

    anything on the touch screen using gestures.Touch screens are a great way to interact

    with applications on mobile devices. With a touch screen, users can easily tap, drag,

    fling, or slide to quickly perform actions in their favourite applications. For app

    developers, the Android framework makes it's easy to recognize simple actions, like a

    swipe, but it has been more difficult to handle complicated gestures, sometimes

    requiring developers to write a lot of code.You can use this application to create a set

    of pre-defined gestures for your own application. It also serves as an example of how to

    let the user defines own gestures in your applications.

  • 7/31/2019 ANDROID and Its Significance

    7/7

    A7, Stephanos Tower, Eachamukku, Kakkanadu,Kochi

    Language TranslatorThis Application is developed using Android. This program will let the user enter a

    phrase in one language and ask Google to translate to a second language.It is extremely

    easy to use and provides a great deal of real-world functionality. If youre travelling out

    of the country, youll definitely want this app in your back pocket (forget the

    dictionaries at home).Another great option built into this app is the ability to send a

    translation via SMS and email. This is an incredibly useful and powerful feature which

    can be used for many purposes. Note: some symbols might not be recognizable by your

    recipients phone, so keep that in mind when sending a message in another language.

    Gallery ViewsIn this we can view images in Grid view and when click any of the images we can see

    that particular image in full size and the grid view also.Galleryis a layout widget used to

    display items in a horizontally scrolling list and positions the current selection at the

    centre of the view. In this, we can view a gallery of photos and then display a toast

    message each time a gallery item is selected.

    Sudoku GameAndroid Sudoku is an Android port of the classic Sudoku puzzle game.

    The objective is to fill a 99 grid with digits so that each column, each row, and each of

    the nine 33 sub-grids that compose the grid (also called "boxes", "blocks", "regions", or

    "sub-squares") contains all of the digits from 1 to 9. The puzzle setter provides a

    partially completed grid, which typically has a unique solution. This offers three

    difficulty levels; hints for players are more interesting in this.

    http://developer.android.com/reference/android/widget/Gallery.htmlhttp://developer.android.com/reference/android/widget/Gallery.htmlhttp://developer.android.com/reference/android/widget/Gallery.htmlhttp://developer.android.com/reference/android/widget/Gallery.html