Android Application (Presentation)

Embed Size (px)

Citation preview

  • 7/31/2019 Android Application (Presentation)

    1/26

    Android Application

    Development

    Presentation ByAkash KhaitanId: 08DDCS547

    FST,ICFAI University

    Sevya It. Pvt. Ltd., HyderabadDuration : 5 Months 14 Days

  • 7/31/2019 Android Application (Presentation)

    2/26

    Project Goals Android Application development using

    Android SDK & Java Platform

    Understanding the lifecycle of ApplicationDevelopment

    Getting full control over User Interface,Navigation, Multimedia

    Game Development & Web AppDevelopment in Android

  • 7/31/2019 Android Application (Presentation)

    3/26

    Android is a softwarestack for mobile

    devices that includesan operating system.

    The Android SDKprovides the tools andAPIs necessary fordeveloping applicationsusing Java

    Introduction

  • 7/31/2019 Android Application (Presentation)

    4/26

    Contents Architecture

    Activity & Services

    User Interface , Menus ,Navigation

    Notifications

    Data Storage Techniques

    Multimedia

    Game Development

    Web Application Development

  • 7/31/2019 Android Application (Presentation)

    5/26

    ArchitectureAndroid architecture consists of

    Kernal

    Libraries

    Runtime

    FrameWork

    Application

  • 7/31/2019 Android Application (Presentation)

    6/26

    Activity & Services An Activity is an

    application componentthat provides ascreen with whichusers can interact

    A service do not

    provide a screen butruns in the backgroundand provides updatesto the UI thread

  • 7/31/2019 Android Application (Presentation)

    7/26

    User Interface The User Interface design is one of the

    most important component in Android

    Application Development. It consists Of : Layout Managers

    TextView, EditText

    Buttons, RadioButton ImageView, Bitmap

    WebView

  • 7/31/2019 Android Application (Presentation)

    8/26

    Layout Managers

    Linear Layout

    Relative Layout

    Frame Layout

    Table layout

  • 7/31/2019 Android Application (Presentation)

    9/26

    Menus

    Provides a familiar and consistent userexperience

    One should use the Menu APIs to presentuser actions and other options in youractivities.

  • 7/31/2019 Android Application (Presentation)

    10/26

    Navigation Provides a better user experience

    Makes the app more user intuitive

    The Navigation components consists of

    Tabs

    Lists

  • 7/31/2019 Android Application (Presentation)

    11/26

    Tabs Presenting different Screens in a single page

    using tabs

    Steps Involved in creating Tab Create separate activities

    Create layouts for activities

    Define a layout for main tab activity In the tab activity, bind all the activities to

    tab host using intents

  • 7/31/2019 Android Application (Presentation)

    12/26

    Lists A user can create a simple list and

    custom list in android

    Adapters are used here to bind the datawith the layout

  • 7/31/2019 Android Application (Presentation)

    13/26

    Notification Several types of situations may arise that

    require you to notify the user about an eventthat occurs in application. Some events requirethe user to respond and others do not.

    Types of Notification in android are :

    Toast Notification

    StatusBar Notification

    Dialogs

  • 7/31/2019 Android Application (Presentation)

    14/26

    Toast Notification Toast.makeText(context,string,duration).

    show();

    The upper line creates a Toast which takescontext,desired string , time and displaysthe toast

    Custom Toast can be created with

    specified layout

  • 7/31/2019 Android Application (Presentation)

    15/26

  • 7/31/2019 Android Application (Presentation)

    16/26

    Dialogs Alert Dialog

    Dialog with Buttons

    Dialogs With List

    Dialog with progress Bar

    Custom Dialogs

    To show a dialog show() method

    Is used

  • 7/31/2019 Android Application (Presentation)

    17/26

    Data Storage Techniques Each and every application requires data

    to be stored for further use

    Android Provides following data storagetechniques

    Shared Preferences

    Internal Storage External Storage

    SQLite Databases

    Network Connection

  • 7/31/2019 Android Application (Presentation)

    18/26

    Shared Preferences Writing to Shared Preferences

    Retrieving from Shared Preferences

    SharedPreferences settings = getSharedPreferences("Mypref", 0);

    SharedPreferences.Editor editor = settings.edit();

    editor.putString("text", text.getText().toString());

    editor.commit();

    SharedPreferences settings = getSharedPreferences("Mypref", 0);

    String temp=settings.getString("text", "Unable to retrieve");

  • 7/31/2019 Android Application (Presentation)

    19/26

    Internal StorageWriting to Internal Storage

    openFileOutput() returnsFileOutputStream object

    Write to the file with write()

    Close the stream with close()

    Retrieving from Internal Storage

    Call openFileInput() returns aFileInputStream.

    Read bytes from the file with read().

    Then close the stream with close().

  • 7/31/2019 Android Application (Presentation)

    20/26

    External StorageGet the External storage

    File sdCard =

    Environment.getExternalStorageDirectory();

    Write to External Storage

    Retrieve from External Storage

    This are available to all the application asthey act as global data

  • 7/31/2019 Android Application (Presentation)

    21/26

    SQLite Database Create a class which extends

    SQLiteOpenHelper

    Create the database and define itsschema in the class

    Get the writable database by calling

    getWritableDatabase();

    Get the readable database

    getWritableDatabase();

  • 7/31/2019 Android Application (Presentation)

    22/26

    Multimedia The Android multimedia framework

    includes support for capturing and playingaudio, video and images in a variety of common media types

    Audio Playback

    Tone Generator

    MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.sound_file_1);mediaPlayer.start(); // no need to call prepare(); create() does that for you

    tone = new ToneGenerator(AudioManager.STREAM_DTMF, 100); //Create

    Tone Generator Object

    tone.startTone(int tonetype,int duration in Ms); //Start tone with tone

    type value and duration

  • 7/31/2019 Android Application (Presentation)

    23/26

    Mobile Web Applications Mobile web apps provide flexibility and code

    reusability. The web apps made for desktopapplication can easily be converted to mobileweb apps with minimum efforts in doing the

    same. Languages: HTML, CSS, JAVASCRIPT, JQUERY

    Features that mobile apps should have are:

    Linking with native libraries (Ex :camera, etc.) UI Look and feel like native application

    (Buttons, Labels, etc.)

    Navigation like native application (Screensliding, orientations, etc.)

  • 7/31/2019 Android Application (Presentation)

    24/26

    Game Development Android supports game development, as a

    result of this several games can be foundin android Play. Some types of games inthe android are:

    Accelerometer Based Games

    Simple Canvas Based Games

    3d Games

  • 7/31/2019 Android Application (Presentation)

    25/26

    ConclusionMy 5 and half months of training at Sevya provided me thoroughknowledge of Mobile Application Development includingBlackberry, Android and J2ME.

    It helped me in understanding the complete life cycle of application development which starts from analytical phasefollowed by documentation phase and on verification goes toimplementation phase.

    In my internship I worked in a team with Mr. Vineet Agarwal andMr. Kumar Raja Donthamsetti and developed some applicationswith reach controls and also some Gaming applications which Ialways dreamed off.

    I got an opportunity to work as a graphic designer for which I usedOpen Source Gimp. I also got an opportunity to prepare somedocumentation and user manuals for the ongoing projects of Sevya.

  • 7/31/2019 Android Application (Presentation)

    26/26

    ReferencesAndroid Developers:(http://developer.android.com)

    Google: (http://google.co.in)Wikipedia: (http://www.wikipedia.org/)

    Mr. Narasayya Donepudi(Co-Founder at SevyaMultimedia)

    Mr. Kumar Raja Donthamsetti (AssociateSoftware Engineer at Sevya Multimedia)

    Mr. Vineet Agarwal (Software Engineer at SevyaMultimedia)