android mobile dev part 1 (morning session)

Upload: psywar

Post on 02-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    1/52

    A

    NDROID

    MOBI

    LE

    AP

    PLICA

    TION

    DE

    VELO

    PMEN

    T

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    2/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    3/52

    What is Android?

    A software bunh o!"risin#not on$% o"eratin# s%ste!but a$so !idd$eware and &e%a""$iations'

    Based on Linu( with a )a*a"ro#ra!!in# interfae'

    apk+$es are distributed andinsta$$ed on Android "owered

    de*ies'

    Went open source in late 2008.Released under the Apache v2license.

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    4/52

    Android Core A""$iation

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    5/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    6/52

    -er*ies

    Baround funtiona$ities Run in the a""$iations. thread

    using TOAST

    usingNOTIFIATION

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    7/52

    Android/ Content Pro*ider

    Pro*ides a""$iations with re0uireda""$iation.s data

    A""$iations 1ta$&1 to ontent "ro*iderthrou#h a ontent reso$*er'

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    8/52

    Wid#ets and Views

    Android "ro*ides se*era$ bui$t2in *iews/ Te(tView Button EditTe(t

    I!a#eView I!a#eButton Che&Bo( RadioButton

    et

    LinearLa%out Re$ati*eLa%o

    ut Tab$eLa%out

    Tab$eRow ListView 3ridView -ro$$View

    et

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    9/52

    -%ste! Re0uire!ents

    Before be#innin# Androidde*e$o"!ent4 "$ease !a&e sure %ouha*e the fo$$owin# insta$$ed/

    !. "ava #evelop$ent %it &"#%' http())***.oracle.co$)technet*ork)+ava)+avase)do*nloads)inde,-+sp-!8/.ht$l

    2. clipse-Android S#%

    http())developer.android.co$&A#T 1undle o 2 and /3-1it'

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    10/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    11/52

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    12/52

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    13/52

    Creatin# a New Pro5et

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    14/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    15/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    16/52

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    17/52

    -with here between3ra"hia$ and 6ML ode*iew

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    18/52

    -with here between 3ra"hia$ and 6ML

    ode *iew

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    19/52

    Contains a$$ #ra"hia$ ob5et forthe onstrution of the user2

    interfae'

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    20/52

    src2 ontains a$$ theati*it% 7)a*a $asses8s"ei+ed b% the user4

    in$udin# the defau$tati*it% $ass'

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    21/52

    First Android 5ro+ect

    The 6ainActivit7.+avais the ati*it% reated "re*ious$%when we reate the "ro5et'

    The ode is auto2#enerated with the "a&a#e whih the"a&a#e na!e reated "re*ious$% when we reate the"ro5et'

    onreate&undle'a$$ed when the ati*it%+rst starts u"'

    use to "erfor! one2ti!einitia$i9ation suh asreatin# the userinterfae'

    ta&es one "ara!eter that

    is either nu$$ or so!estate infor!ation"re*ious$% sa*ed b% theon-a*eInstane-tate78!ethod'

    Android a$$s the onreate& '!ethod of %our ati*it% to initiali9eit'The a$$ to setontent:ie*& ' +$$s in the ontents of the ati*it%:ssreen with an Android vie* *idget.

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    22/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    23/52

    dra*a1leolder&s8;ontains a$$i!a#e +$es'

    la7outolder;6ML +$e with $a%outdesri"tion +$esused to de+ne theuser interfae foractivitiesand Fragments'

    valuesolder; used to de+ne strin#s4o$ors4 di!ensions4 st%$es and stati

    arra%s of strin#s orinte#ers'

    $enu older; De+ne the "ro"erties ofentries for a !enu

    4I5S Integrated #evelop$ent Tools

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    24/52

    I$portant( All activities &progra$ ;le' andper$ission $ust 1e declare in thepro+ect

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    25/52

    Create an Android Virtua$ De*ie

    Option No.! ( Select Windo*-= Android :irtual #evice6anagerro$ the $enu.

    Option No.2( lick the icon or Android :irtual #evice6anager.

    O"tionNo' it use he(adei!a$*a$ue for o$oro!bination where iswhite and , is b$a&'

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    47/52

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    48/52

    Lin&in# our Phone to our Co!"uter

    Connet %our "hone to %ouro!"uter *ia -B' Turn on %our"hone'

    -e$et -ettin#s A""$iations De*e$o"!ent and then enab$eS de1ugging'

    -B Dri*er for s"ei+ handset!ust be insta$$ to the o!"uter' htt"/de*e$o"er'android'o!sd&win2

    usb'ht!$

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    49/52

    Dea$in# with a Bui$d2in @ardware 7Ca!era8

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    50/52

    Android ,i$e -%ste!

    our data stora#e o"tions are thefo$$owin#/

    Shared 5reerences / -tore "ri*ate"ri!iti*e data in &e%2*a$ue "airs'

    Internal Storage / -tore "ri*atedata on the de*ie !e!or%'

    ,ternal Storage / -tore "ub$idata on the shared e(terna$ stora#e'

    SB4ite#ata1ases / -tore strutureddata in a "ri*ate database'

    50

    -o!e of the u"o!in# ha$$en#es

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    51/52

    -o!e of the u"o!in# ha$$en#es4i!"ossib$e?

    Persona$ hea$th !onitorin# Wire$ess @o!e Auto!ation

    Wire$ess Android Contro$$ed Robot

    Industria$ A""$ianes Contro$

    En*iron!ent -ensin#

    -!art @o!e -%ste! ,or Disab$edPeo"$e

    No"e4 nothin# is i!"ossib$e

  • 8/10/2019 Android Mobile Dev Part 1 (Morning Session)

    52/52