+ All Categories
Home > Documents > Walky Project Doc.format

Walky Project Doc.format

Date post: 07-Jul-2018
Category:
Upload: angel-catherine
View: 213 times
Download: 0 times
Share this document with a friend

of 73

Transcript
  • 8/18/2019 Walky Project Doc.format

    1/73

    INDEX

    Sr  No.Topic   Date Page

    1 Introduction 2

    2 General Concepts

    5

    3 Android App Concepts8

    4 Actiit!13

    5 "ani#est 2$

    % De&ugging In 'clipse 3(

    $ Android ) *"I Calculator 42

    8 Diagra++atic ,erie-

    45

    (

    sing t/e Android '+ulator  54

      10o- to se *"I Calculator  %1

    11

    i+itations uture 'n/ance+ents %2

    1

  • 8/18/2019 Walky Project Doc.format

    2/73

    Introduction

    Background:

    Walky as na+ed is an android &ased 6esearc/ Pro7ect. It is an si+ple slee applicationco+pati&le -it/ +ost o# t/e Android P/ones running ,perating S!ste+ ersion92.3.% ora&oe9. :al! ena&les t-o Android &ased P/ones to co++unicate eac/ ot/er -it/ inocal Area Net-or.

    It Si+ulates egac! :al! Tal!/al# duple; &ut one -/ic/ is IP &ased. T/isresearc/ application is &een opti+i

  • 8/18/2019 Walky Project Doc.format

    3/73

    Ob)ecti'e Of !%e"i":

    Ai+ -as to learn an Android S!ste+ to deep e;tent. Create a Deplo!a&le App using

     Net-or and ,t/er ard-are +ic ) speaers. Also -oring -it/ nu+erous T/reads asAndroid Applications are T/read Sensitie.

    • *asic &ut deep use o# net-oring understanding &e/aior o# net-or trans#er.• Dealing -it/ speec/ and di##erent -a!s to send and receie oice +essage and

    t/eir opti+i

  • 8/18/2019 Walky Project Doc.format

    4/73

    Ba"ic *e+uirement":

     

    Android SD?. 

    'clipse ID' "! C/oice. @Android ADT plug in. 

    aa and B" no-ledge.

    ,ard$are *e+uirement":

     

    Android Po-ered P/one 

    "in CP 500"< 

    SD card +in 10 "& 

    Internal "e+or! 3 "* -/en installed 

    "in Android API >ersion 2.3 Ginger *read 

    "a; Android API >ersion 4.0 Ice Crea+ Sand-ic/

    4

  • 8/18/2019 Walky Project Doc.format

    5/73

    -eneral .once/t"

    W%at I" Android0

    ou +ig/t /ae seen -indo-sE inu; and "ac operating s!ste+s -/ic/ are +ade #orco+puters. :indo-s is t/e +ost popular operating s!ste+ on co+puters. So i# !ou no-a&out it t/en it is eas! #or !ou to get an ans-er #or -/at is android.

    Android is also an operating s!ste+ deeloped &! Google. *asicall! it -as started &!so+e ot/er co+pan! -/ic/ -as taen &! Google. Google i+proed t/e operating s!ste+and +ade it a open source plat#or+. It -as -idel! adapted oer t/e -orld. As it is opensource it is so popular a+ongst t/e S+artp/one. Android ,S can also &e used on ta&let

    PCs.

    Official Android Logo(

    Android is a inu;F&ased operating s!ste+ designed pri+aril! #or touc/ screen +o&iledeices.

    Android is open source and Google releases t/e code under t/e Apac/e icense.11H

     T/isopen source code and per+issie licensing allo-s t/e so#t-are to &e #reel! +odi#ied anddistri&uted &! deice +anu#acturersE -ireless carriers and ent/usiast deelopers.Additionall!E Android /as a large co++unit! o# deelopers -riting applications appst/at e;tend t/e #unctionalit! o# deicesE -ritten pri+aril! in a custo+i

  • 8/18/2019 Walky Project Doc.format

    6/73

    6

  • 8/18/2019 Walky Project Doc.format

    7/73

    Android 1er"ion":

    •  J Android &eta.• K 1.5 J Android Cupcae.• K 1.% J Android Donut.• 2.0L2.1 J Mclair.• 2.2.; J ro!o.• 2.3.; J Ginger&read.• 3.; J one!co+& used +ainl! #or ta&lets.• 4.0.; J Ice Crea+ Sand-ic/ &ot/ #or p/ones and ta&le• 4.1L4.2Fell!*eans.

    As da! &! da! t/ere is a drastic deelop+ent in /ard-are need #or so#t-are support alsoarise and later ersion are getting &etter and &etter -it/ ulti2/roce""or De'ice"(

    7

  • 8/18/2019 Walky Project Doc.format

    8/73

    Android Arc%itecture:

    Android consists o# a ernel &ased on inu; ernel ersion 2.% andE #ro+ Android 4.0  IceCream Sandwich on-ardsE ersion 3.;E -it/ +iddle-areE li&raries and APIs -ritten in CEand application so#t-are running on an application #ra+e-or -/ic/ includes aaFco+pati&le li&raries &ased on Apac/e ar+on!. Android uses t/e Dali irtual+ac/ine -it/ 7ustFinFti+e co+pilation to run Dali de;Fcode Dali ';ecuta&leE-/ic/ is usuall! translated #ro+ aa &!te code. T/e +ain /ard-are plat#or+ #or Androidis t/e A6" arc/itecture. T/ere is support #or ;8% #ro+ t/e Android ;8% pro7ectE and

    Google uses a special ;8% ersion o# Android.

    Androids inu; ernel /as #urt/er arc/itecture c/anges &! Google outside t/e t!picalinu; ernel deelop+ent c!cle. Android does not /ae a natieB :indo- S!ste+ &!de#ault nor does it support t/e #ull set o# standard GN li&rariesE and t/is +aes itdi##icult to port e;isting inu; applications or li&raries to Android. Support #or si+ple C

    8

  • 8/18/2019 Walky Project Doc.format

    9/73

    and SD applications is possi&le &! in7ection o# a s+all aa s/i+ and usage o#t/e NI lieE #or e;a+pleE in t/e agged Alliance 2 port #or Android.

    Android A// .once/t":

    Android apps +ae li#e easier and are eas! to understand. :/en people use !our app #ort/e #irst ti+eE t/e! s/ould intuitiel! grasp t/e +ost i+portant #eatures. T/e design -or doesntstop at t/e #irst useE t/oug/. Android apps re+oe ongoing c/ores lie #ile +anage+ent ands!ncing. Si+ple tass neer reOuire co+ple; proceduresE and co+ple; tass are tailored to t/e/u+an /and and +ind.

    De"ign Princi/le"

    Androids s!ste+ I proides t/e #ra+e-or on top o# -/ic/ !ou &uild !our app.

    i+portant aspects include t/e o+e screen e;perienceE glo&al deice naigationE andnoti#ications. Build visually compelling apps that look great on any device.se color and illu+ination to respond to touc/esE rein#orce t/e resulting &e/aiors

    o# gesturesE and indicate -/at actions are ena&led and disa&led.:/eneer a user touc/es an actiona&le area in !our appE proide a isual

    response. T/is lets t/e user no- -/ic/ o&7ect -as touc/ed and t/at !our app islistening.

    State"

     

    9

  • 8/18/2019 Walky Project Doc.format

    10/73

     Most of Android's UI elements have touch-feedack uilt in! including states that

    indicate whether touching the element will have any effect"

    10

  • 8/18/2019 Walky Project Doc.format

    11/73

    Pattern":

     #esign apps that ehave in a consistent! predictale fashion"

    #I 3#"er Interface4

    Android I is an XML #ra+e -or and &e/aior is Java plat#or+.T/e grap/ical user inter#ace #or an Android app is &uilt using a /ierarc/!o# >ie- and >ie- Group o&7ects. >ie- o&7ects are usuall! I -idgets suc/as &uttons or te;t #ields and >ie- Group o&7ects are inisi&le ie- containers t/at de#ine/o- t/e c/ild ie-s are laid outE suc/ as in a grid or a ertical list.Android proides an B" oca&ular! t/at corresponds to t/e su&classeso# >ie- and >ie- Group so !ou can de#ine !our I in B" using a /ierarc/! o# Iele+ents.

     Ever thing is a view, a button is a view, a textview is a view or even a radio button is a

    view.

    ';a+ple o# B" ile

    11

  • 8/18/2019 Walky Project Doc.format

    12/73

    Layout": ust lie -e use lo- a!outL *order a!out in aa S-ing applicationsE /eresa+e goes #or inear a!out L6elatie a!out to place an! co+ponent or ie- in so+e#as/ion.

    LinearLayout

    e;tends >ie-GroupA a!out t/at arranges its c/ildren in a single colu+n or a single ro-. T/e direction o#t/e ro- can &e set &! calling set,rientation. ou can also speci#! grait!E -/ic/speci#ies t/e align+ent o# all t/e c/ild ele+ents &! calling setGrait! or speci#! t/atspeci#ic c/ildren gro- to #ill up an! re+aining space in t/e la!out &! settingt/e weight  +e+&er o# ineara!out.a!outPara+s. T/e de#ault orientation is /oriie-occupies a rectangular area on t/e screen and is responsi&le #or dra-ing and eent/andling. >ie- is t/e &ase class #or widgetsE -/ic/ are used to create interactie Ico+ponents &uttonsE te;t #ieldsE etc.. T/e >ie-Groupsu&class is t/e &ase class#or layoutsE -/ic/ are inisi&le containers t/at /old ot/er >ie-s or ot/er >ie-Groupsand de#ine t/eir la!out properties.

    or ';a+pleEdit!e5t

    e;tends Te;t>ie-

  • 8/18/2019 Walky Project Doc.format

    13/73

    IN!E*NA!IONALISA!ION 3I67Nationali8ation4

    Android A//lication Strictly 9ollo$ I67Nationali8ation .once/t(

    Internationali

  • 8/18/2019 Walky Project Doc.format

    14/73

    &a'a Platform *e/aior

    :/ile B" Scripts adds a oo and eel to an! Android APPE aa is responsi&leto actual &e/aior and -oring o# APP. :/en a user PressE Touc/E S-ipe an! >ie- on t/eScreen a 7aa code &ac t/ere is responsi&le #or carr!ing out t/e operations.

    Actiit! and Serice classes are t/e actual progra++ed co+ponent in all Android participation.

    14

  • 8/18/2019 Walky Project Doc.format

    15/73

    Acti'itye;tends Conte;tT/e+e:rapper

    An acti'ity i" a "ingleE #ocused t/ing t/at t/e user can do. Al+ost all actiities interact-it/ t/e userE so t/e Actiit! class taes care o# creating a -indo- #or !ou in -/ic/ !ou

    can place !our I -it/setContent>ie->ie-. :/ile actiities are o#ten presented to t/euser as #ullFscreen -indo-sE t/e! can also &e used in ot/er -a!s as #loating -indo-sia a t/e+e -it/ -indo-Isloating set or e+&edded inside o# anot/er actiit!using Actiit!Group. T/ere are t-o +et/ods al+ost all su&classes o# Actiit! -illi+ple+ent

    • onCreate*undle is -/ere !ou initialiie-*!Id to gett/e'ditTe;t ele+ent and add its te;t alue to t/e intent

    15

    http://developer.android.com/reference/android/app/Activity.html#findViewById(int)http://developer.android.com/reference/android/widget/EditText.htmlhttp://developer.android.com/reference/android/app/Activity.html#findViewById(int)http://developer.android.com/reference/android/widget/EditText.html

  • 8/18/2019 Walky Project Doc.format

    16/73

     pu&lic a&stract class.onte5t

    e;tends ,&7ect

    Inter#ace to glo&al in#or+ation a&out an application eniron+ent. T/is is an a&stract class

    -/ose i+ple+entation is proided &! t/e Android s!ste+. It allo-s access to applicationFspeci#ic resources and classesE as -ell as upFcalls #or applicationFleel operations suc/ aslaunc/ing actiitiesE &roadcasting and receiing intentsE etc

    Starting an Acti'ity

    nlie ot/er progra++ing paradig+s in -/ic/ apps are launc/ed -it/ a +ain +et/odEt/e Android s!ste+ initiates code in an Actiit! instance &! inoing speci#ic call&ac+et/ods t/at correspond to speci#ic stages o# its li#ec!cle. T/ere is a seOuence o# call&ac 

    +et/ods t/at start up an actiit! and a seOuence o# call&ac +et/ods t/at tear do-n anactiit!.

    Acti'ity Life .ycle

    During t/e li#e o# an actiit!E t/e s!ste+ calls a core set o# li#ec!cle +et/ods in aseOuence si+ilar to a step p!ra+id. T/at isE eac/ stage o# t/e actiit! li#ec!cle is aseparate step on t/e p!ra+id. As t/e s!ste+ creates a ne- actiit! instanceE eac/ call&ac +et/od +oes t/e actiit! state one step to-ard t/e top. T/e top o# t/e p!ra+id is t/e point at -/ic/ t/e actiit! is running in t/e #oreground and t/e user can interact -it/ it.

    16

    http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html

  • 8/18/2019 Walky Project Doc.format

    17/73

    6esu+ed

    In t/is stateE t/e actiit! is in t/e #oreground and t/e user can interact -it/ it. Alsoso+eti+es re#erred to as t/e running state.

    PausedIn t/is stateE t/e actiit! is partiall! o&scured &! anot/er actiit!t/e ot/er actiit! t/atsin t/e #oreground is se+iFtransparent or doesnt coer t/e entire screen. T/e pausedactiit! does not receie user input and cannot e;ecute an! code.

    Stopped

    In t/is stateE t/e actiit! is co+pletel! /idden and not isi&le to t/e user it is consideredto &e in t/e &acground. :/ile stoppedE t/e actiit! instance and all its state in#or+ationsuc/ as +e+&er aria&les is retainedE &ut it cannot e;ecute an! code.

    T/e ot/er states Created and Started are transient and t/e s!ste+ Ouicl! +oes #ro+t/e+ to t/e ne;t state &! calling t/e ne;t li#ec!cle call&ac +et/od. T/at isE a#ter t/es!ste+ calls onCreateE it Ouicl! calls onStartE -/ic/ is Ouicl! #ollo-ed &! on6esu+e.

    T/e +ain actiit! #or !our app +ust &e declared in t/e +ani#est -it/ an QintentF#ilterR t/at includes t/e "AIN action and ANC'6  categor!. or e;a+ple

           

    17

    http://developer.android.com/guide/topics/manifest/intent-filter-element.htmlhttp://developer.android.com/guide/topics/manifest/intent-filter-element.htmlhttp://developer.android.com/guide/topics/manifest/intent-filter-element.htmlhttp://developer.android.com/guide/topics/manifest/intent-filter-element.html

  • 8/18/2019 Walky Project Doc.format

    18/73

    Acti'ity .la"" ember" 3In Detail4

    Activity

    extends ContextThemeWrapper implements ComponentCallbacks !e"#vent.Callback $a"outInflater.%actor"  &ie'.(nCreateCo

    ntextMenu$istenerWindo'.Callback

     java.lang.Object

     

    android.content.Context

     

    android.content.ContextWrapper

     

    android.view.Context!e"eWrapper

      ↳android.app.#ctivit$

    %nown 'irect ()bcla**e*

    #cco)nt#)t!enticator#ctivit$+ #ctivit$,ro)p+ #lia*#ctivit$+ -xpandablei*t#ctivit$ + /rag"ent#

    i*t#ctivit$+ative#ctivit$

    %nown ndirect ()bcla**e*

    a)nc!er#ctivit$+ reerence#ctivit$+ ab#ctivit$

    9ragment"

    Starting -it/ ,N'C,"*E Actiit! i+ple+entations can +ae use o#t/e rag+ent class to &etter +odulari

  • 8/18/2019 Walky Project Doc.format

    19/73

    • I# an actiit! in t/e #oreground o# t/e screen at t/e top o# t/e stacE itis active or running .

    • I# an actiit! /as lost #ocus &ut is still isi&le t/at isE a ne- nonF#ullFsi

  • 8/18/2019 Walky Project Doc.format

    20/73

  • 8/18/2019 Walky Project Doc.format

    21/73

    sees -/at !ou are displa!ing. T/e onStart and onStop +et/ods can &e called+ultiple ti+esE as t/e actiit! &eco+es isi&le and /idden to t/e user.

    • T/e foreground lifetime o# an actiit! /appens &et-een a callto on6esu+e until a corresponding call to onPause. During t/is ti+e t/e actiit! isin #ront o# all ot/er actiities and interacting -it/ t/e user. An actiit! can #reOuentl!

    go &et-een t/e resu+ed and paused states FF #or e;a+ple -/en t/e deice goes tosleepE -/en an actiit! result is delieredE -/en a ne- intent is deliered FF so t/e codein t/ese +et/ods s/ould &e #airl! lig/t-eig/t.

    T/e entire li#ec!cle o# an actiit! is de#ined &! t/e #ollo-ing Actiit! +et/ods. All o#t/ese are /oos t/at !ou can oerride to do appropriate -or -/en t/e actiit! c/angesstate. All actiities -ill i+ple+entonCreate*undle to do t/eir initial setup +an! -illalso i+ple+ent onPause to co++it c/anges to data and ot/er-ise prepare to stopinteracting -it/ t/e user. ou s/ould al-a!s call up to !our superclass -/eni+ple+enting t/ese +et/ods.

     !ulic class ctivity extends !!lication9ontext   !rotected void on9reate2undle savednstance/tate56

      !rotected void on/tart256 

    !rotected void on;estart256

      !rotected void on;esume256

      !rotected void onause256

      !rotected void on/to!256

      !rotected void on4estroy256  

    21

    http://developer.android.com/reference/android/app/Activity.html#onResume()http://developer.android.com/reference/android/app/Activity.html#onPause()http://developer.android.com/reference/android/app/Activity.html#onPause()http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/app/Activity.html#onPause()http://developer.android.com/reference/android/app/Activity.html#onResume()http://developer.android.com/reference/android/app/Activity.html#onPause()http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/app/Activity.html#onPause()

  • 8/18/2019 Walky Project Doc.format

    22/73

    .onfiguration .%ange"

    I# t/e con#iguration o# t/e deice as de#ined &! t/e 6esources.Con#iguration classc/angesE t/en an!t/ing displa!ing a user inter#ace -ill need to update to +atc/ t/atcon#iguration. *ecause Actiit! is t/e pri+ar! +ec/anis+ #or interacting -it/ t/e userE itincludes special support #or /andling con#iguration c/anges.

    nless !ou speci#! ot/er-iseE a con#iguration c/ange suc/ as a c/ange in screenorientationE languageE input deicesE etc -ill cause !our current actiit! to &e destroyed Egoing t/roug/ t/e nor+al actiit! li#ec!cle process o# onPauseE onStopEand onDestro! as appropriate. I# t/e actiit! /ad &een in t/e #oreground or isi&le to t/euserE once onDestro! is called in t/at instance t/en a ne- instance o# t/e actiit! -ill &ecreatedE -it/ -/ateer saedInstanceState t/e preious instance /ad generated#ro+onSaeInstanceState*undle.

    T/is is done &ecause an! application resourceE including la!out #ilesE can c/ange &asedon an! con#iguration alue. T/us t/e onl! sa#e -a! to /andle a con#iguration c/ange is toreFretriee all resourcesE including la!outsE dra-a&lesE and strings. *ecause actiities+ust alread! no- /o- to sae t/eir state and reFcreate t/e+seles #ro+ t/at stateE t/is isa conenient -a! to /ae an actiit! restart itsel# -it/ a ne- con#iguration.

    In so+e special casesE !ou +a! -ant to &!pass restarting o# !our actiit! &ased on one or+ore t!pes o# con#iguration c/anges. T/is is done -it/t/e androidcon#igC/anges attri&ute in its +ani#est. or an! t!pes o# con#igurationc/anges !ou sa! t/at !ou /andle t/ereE !ou -ill receie a call to !our currentactiit!s onCon#igurationC/angedCon#iguration +et/od instead o# &eing restarted. I# a

    con#iguration c/ange inoles an! t/at !ou do not /andleE /o-eerE t/e actiit! -ill still &e restarted andonCon#igurationC/angedCon#iguration -ill not &e called.

    Starting Acti'itie" and -etting *e"ult"

    T/e startActiit!Intent +et/od is used to start a ne- actiit!E -/ic/ -ill &e placed att/e top o# t/e actiit! stac. It taes a single argu+entE an IntentE -/ic/ descri&es t/eactiit! to &e e;ecuted.

    So+eti+es !ou -ant to get a result &ac #ro+ an actiit! -/en it ends. or e;a+pleE !ou+a! start an actiit! t/at lets t/e user pic a person in a list o# contacts -/en it endsE it

    returns t/e person t/at -as selected. To do t/isE !ou call t/e startActiit!or6esultIntentEint ersion -it/ a second integer para+eter identi#!ing t/e call. T/e result -ill co+e &ac t/roug/ !our onActiit!6esultintE intE Intent +et/od.

    :/en an actiit! e;itsE it can call set6esultint to return data &ac to its parent. It +ustal-a!s suppl! a result codeE -/ic/ can &e t/e standard results 6'STCANC''DE6'ST,?E or an! custo+ alues starting at 6'STI6STS'6. In additionE it

    22

  • 8/18/2019 Walky Project Doc.format

    23/73

  • 8/18/2019 Walky Project Doc.format

    24/73

    Process Lifecycle

    T/e Android s!ste+ atte+pts to eep application process around #or as long as possi&leE &ut eentuall! -ill need to re+oe old processes -/en +e+or! runs lo-. As descri&edin Actiit! i#ec!cleE t/e decision a&out -/ic/ process to re+oe is inti+atel! tied to t/estate o# t/e users interaction -it/ it. In generalE t/ere are #our states a process can &e in &ased on t/e actiities running in itE listed /ere in order o# i+portance. T/e s!ste+ -illill less i+portant processes t/e last ones &e#ore it resorts to illing +ore i+portant processes t/e #irst ones.

    1. T/e foreground acti'ity t/e actiit! at t/e top o# t/e screen t/at t/e user iscurrentl! interacting -it/ is considered t/e +ost i+portant. Its process -ill onl! &eilled as a last resortE i# it uses +ore +e+or! t/an is aaila&le on t/e deice. Generall!at t/is point t/e deice /as reac/ed a +e+or! paging stateE so t/is is reOuired in orderto eep t/e user inter#ace responsie.

    2. A 'i"ible acti'ity an actiit! t/at is isi&le to t/e user &ut not in t/e #oregroundEsuc/ as one sitting &e/ind a #oreground dialog is considered e;tre+el! i+portant and-ill not &e illed unless t/at is reOuired to eep t/e #oreground actiit! running.

    3. A background acti'ity an actiit! t/at is not isi&le to t/e user and /as &een paused is no longer criticalE so t/e s!ste+ +a! sa#el! ill its process to reclai++e+or! #or ot/er #oreground or isi&le processes. I# its process needs to &e illedE-/en t/e user naigates &ac to t/e actiit! +aing it isi&le on t/e screen againEits onCreate*undle +et/od -ill &e called -it/ t/e saedInstanceState it /ad preiousl! supplied in onSaeInstanceState*undle so t/at it can restart itsel# in t/e

    sa+e state as t/e user last le#t it.

    4. An em/ty /roce"" is one /osting no actiities or ot/er application co+ponentssuc/ as Serice or *roadcast6eceier  classes. T/ese are illed er! Ouicl! &! t/es!ste+ as +e+or! &eco+es lo-. or t/is reasonE an! &acground operation !ou dooutside o# an actiit! +ust &e e;ecuted in t/e conte;t o# an actiit! *roadcast6eceieror Serice to ensure t/at t/e s!ste+ no-s it needs to eep !our process around.

    So+eti+es an Actiit! +a! need to do a longFrunning operation t/at e;ists independentl!o# t/e actiit! li#ec!cle itsel#. An e;a+ple +a! &e a ca+era application t/at allo-s !ou toupload a picture to a -e& site. T/e upload +a! tae a long ti+eE and t/e application

    s/ould allo- t/e user to leae t/e application -ill it is e;ecuting. To acco+plis/ t/isE!our Actiit! s/ould start a Serice in -/ic/ t/e upload taes place. T/is allo-s t/es!ste+ to properl! prioriti

  • 8/18/2019 Walky Project Doc.format

    25/73

    ';pandH

    n!erited Con*tant*

    /ro" cla** android.content.Conte;t

    /ro" interace android.content.Co+ponentCall&acs2

    )blic Con*tr)ctor*

    Actiit!

    Pu&lic "et/ods

    oid addContent>ie->ie- ie-E >ie-Group.a!outPara+s  para+sAdd an additional content ie- to t/e actiit!.

    oid closeConte;t"enuProgra++aticall! closes t/e +ost recentl! opened conte;t +enuE i# s/o-ing.

    oid close,ptions"enuProga++aticall! closes t/e options +enu.

    PendingIntent createPending6esultint reOuestCodeE Intent dataE int #lagsCreate a ne- PendingIntent o&7ect -/ic/ !ou can /and to ot/ers #or t/e+ to use to sendresult data &ac to !our onActiit!6esultintE intE Intentcall&ac.

    #inal oid dis+issDialogint id$his method was deprecated in A%I level &" Use the new Dialograg+ent classwith rag+ent"anager  instead( this is also availale on older platforms through the

     Android compatiility package"

     &oolean dispatc/Generic"otion'ent"otion'ent eCalled to process generic +otion eents.

     &oolean dispatc/?e!'ent?e!'ent eentCalled to process e! eents.

     &oolean dispatc/?e!S/ortcut'ent?e!'ent eentCalled to process a e! s/ortcut eent.

     &oolean dispatc/PopulateAccessi&ilit!'entAccessi&ilit!'ent eentCalled to process population o# Accessi&ilit!'ents.

     &oolean dispatc/Touc/'ent "otion'ent eCalled to process touc/ screen eents.

     &oolean dispatc/Trac&all'ent"otion'ent eCalled to process trac&all eents.

    oid du+pString pre#i;E ileDescriptor  #dE Print:riter  -riterE StringH argsPrint t/e Actiit!s state into t/e gien strea+.

    >ie- #ind>ie-*!Idint idinds a ie- t/at -as identi#ied &! t/e id attri&ute #ro+ t/e B" t/at -as processedin onCreate*undle.

    oid #inis/Call t/is -/en !our actiit! is done and s/ould &e closed.

    oid #inis/Actiit!int reOuestCodeorce #inis/ anot/er actiit! t/at !ou /ad preiousl! started-it/ startActiit!or6esultIntentE int.

    25

    http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/content/ComponentCallbacks2.htmlhttp://developer.android.com/reference/android/content/ComponentCallbacks2.htmlhttp://developer.android.com/reference/android/app/Activity.html#Activity()http://developer.android.com/reference/android/app/Activity.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#closeContextMenu()http://developer.android.com/reference/android/app/Activity.html#closeContextMenu()http://developer.android.com/reference/android/app/Activity.html#closeOptionsMenu()http://developer.android.com/reference/android/app/Activity.html#closeOptionsMenu()http://developer.android.com/reference/android/app/PendingIntent.htmlhttp://developer.android.com/reference/android/app/Activity.html#createPendingResult(int,%20android.content.Intent,%20int)http://developer.android.com/reference/android/app/Activity.html#createPendingResult(int,%20android.content.Intent,%20int)http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onActivityResult(int,%20int,%20android.content.Intent)http://developer.android.com/reference/android/app/Activity.html#dismissDialog(int)http://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/app/Activity.html#dispatchGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchKeyShortcutEvent(android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.htmlhttp://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.htmlhttp://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchTouchEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/app/Activity.html#dispatchTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dump(java.lang.String,%20java.io.FileDescriptor,%20java.io.PrintWriter,%20java.lang.String[])http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/java/io/FileDescriptor.htmlhttp://developer.android.com/reference/java/io/FileDescriptor.htmlhttp://developer.android.com/reference/java/io/PrintWriter.htmlhttp://developer.android.com/reference/java/io/PrintWriter.htmlhttp://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#findViewById(int)http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#finishActivity(int)http://developer.android.com/reference/android/app/Activity.html#finishActivity(int)http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent,%20int)http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent,%20int)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/content/ComponentCallbacks2.htmlhttp://developer.android.com/reference/android/app/Activity.html#Activity()http://developer.android.com/reference/android/app/Activity.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#closeContextMenu()http://developer.android.com/reference/android/app/Activity.html#closeOptionsMenu()http://developer.android.com/reference/android/app/PendingIntent.htmlhttp://developer.android.com/reference/android/app/Activity.html#createPendingResult(int,%20android.content.Intent,%20int)http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onActivityResult(int,%20int,%20android.content.Intent)http://developer.android.com/reference/android/app/Activity.html#dismissDialog(int)http://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchKeyShortcutEvent(android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.htmlhttp://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchTouchEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dispatchTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#dump(java.lang.String,%20java.io.FileDescriptor,%20java.io.PrintWriter,%20java.lang.String[])http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/java/io/FileDescriptor.htmlhttp://developer.android.com/reference/java/io/PrintWriter.htmlhttp://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#findViewById(int)http://developer.android.com/reference/android/app/Activity.html#onCreate(android.os.Bundle)http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#finishActivity(int)http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent,%20int)

  • 8/18/2019 Walky Project Doc.format

    26/73

    oid #inis/Actiit!ro+C/ildActiit! c/ildE int reOuestCodeT/is is called -/en a c/ild actiit! o# t/is one calls its #inis/Actiit!.

    oid #inis/A##init!inis/ t/is actiit! as -ell as all actiities i++ediatel! &elo- it in t/e current tas t/at/ae t/e sa+e a##init!.

    oid #inis/ro+C/ildActiit! c/ildT/is is called -/en a c/ild actiit! o# t/is one calls its #inis/ +et/od.

    Action*ar  getAction*ar 6etriee a re#erence to t/is actiit!s Action*ar.

    #inal Application

    getApplication6eturn t/e application t/at o-ns t/is actiit!.

    Co+ponentNa+e

    getCallingActiit!6eturn t/e na+e o# t/e actiit! t/at inoed t/is actiit!.

    String getCallingPacage6eturn t/e na+e o# t/e pacage t/at inoed t/is actiit!.

    int getC/angingCon#igurationsI# t/is actiit! is &eing destro!ed &ecause it can not /andle a con#iguration para+eter

     &eing c/anged and t/us itsonCon#igurationC/angedCon#iguration +et/odis not  &eing calledE t/en !ou can use t/is +et/od to discoer t/e set o# c/anges t/at/ae occurred -/ile in t/e process o# &eing destro!ed.

    Co+ponentNa+e

    getCo+ponentNa+e6eturns co+plete co+ponent na+e o# t/is actiit!.

    >ie- getCurrentocusCalls getCurrentocus on t/e :indo- o# t/is Actiit! to return t/e currentl! #ocusedie-.

    rag+ent"anager 

    getrag+ent"anager 6eturn t/e rag+ent"anager #or interacting -it/ #rag+ents associated -it/ t/isactiit!.

    Intent getIntent

    6eturn t/e intent t/at started t/is actiit!.,&7ect getastNonCon#igurationInstance

    $his method was deprecated in A%I level &" Use thenew rag+ent  A%I  set6etainInstance&oolean instead( this is also availale on older

     platforms through the Android compatiility package"

    a!outIn#later  geta!outIn#later Conenience #or calling geta!outIn#later.

    oader"anager  getoader"anager 6eturn t/e oader"anager #or t/is #rag+entE creating it i# needed.

    String getocalClassNa+e6eturns class na+e #or t/is actiit! -it/ t/e pacage pre#i; re+oed.

    "enuIn#later  get"enuIn#later 6eturns a "enuIn#later  -it/ t/is conte;t.

    #inal Actiit! getParent6eturn t/e parent actiit! i# t/is ie- is an e+&edded c/ild.

    Intent getParentActiit!Intent,&tain an Intent t/at -ill launc/ an e;plicit target actiit! speci#ied &! t/is actiit!slogical parent.

    S/aredPre#erences

    getPre#erencesint +ode6etriee a S/aredPre#erences o&7ect #or accessing pre#erences t/at are priate to t/is

    26

    http://developer.android.com/reference/android/app/Activity.html#finishActivityFromChild(android.app.Activity,%20int)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#finishAffinity()http://developer.android.com/reference/android/app/Activity.html#finishFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.html#finishFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/ActionBar.htmlhttp://developer.android.com/reference/android/app/Activity.html#getActionBar()http://developer.android.com/reference/android/app/Application.htmlhttp://developer.android.com/reference/android/app/Application.htmlhttp://developer.android.com/reference/android/app/Application.htmlhttp://developer.android.com/reference/android/app/Activity.html#getApplication()http://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCallingActivity()http://developer.android.com/reference/android/app/Activity.html#getCallingActivity()http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCallingPackage()http://developer.android.com/reference/android/app/Activity.html#getChangingConfigurations()http://developer.android.com/reference/android/app/Activity.html#getChangingConfigurations()http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)http://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/app/Activity.html#getComponentName()http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCurrentFocus()http://developer.android.com/reference/android/app/Activity.html#getCurrentFocus()http://developer.android.com/reference/android/view/Window.html#getCurrentFocus()http://developer.android.com/reference/android/view/Window.html#getCurrentFocus()http://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#getFragmentManager()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/java/lang/Object.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLastNonConfigurationInstance()http://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/view/LayoutInflater.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLayoutInflater()http://developer.android.com/reference/android/app/Activity.html#getLayoutInflater()http://developer.android.com/reference/android/view/Window.html#getLayoutInflater()http://developer.android.com/reference/android/app/LoaderManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLoaderManager()http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLocalClassName()http://developer.android.com/reference/android/view/MenuInflater.htmlhttp://developer.android.com/reference/android/app/Activity.html#getMenuInflater()http://developer.android.com/reference/android/view/MenuInflater.htmlhttp://developer.android.com/reference/android/view/MenuInflater.htmlhttp://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#getParent()http://developer.android.com/reference/android/app/Activity.html#getParent()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getParentActivityIntent()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/app/Activity.html#getPreferences(int)http://developer.android.com/reference/android/app/Activity.html#getPreferences(int)http://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/app/Activity.html#finishActivityFromChild(android.app.Activity,%20int)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#finishAffinity()http://developer.android.com/reference/android/app/Activity.html#finishFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/ActionBar.htmlhttp://developer.android.com/reference/android/app/Activity.html#getActionBar()http://developer.android.com/reference/android/app/Application.htmlhttp://developer.android.com/reference/android/app/Application.htmlhttp://developer.android.com/reference/android/app/Activity.html#getApplication()http://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCallingActivity()http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCallingPackage()http://developer.android.com/reference/android/app/Activity.html#getChangingConfigurations()http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)http://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/content/ComponentName.htmlhttp://developer.android.com/reference/android/app/Activity.html#getComponentName()http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#getCurrentFocus()http://developer.android.com/reference/android/view/Window.html#getCurrentFocus()http://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#getFragmentManager()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/java/lang/Object.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLastNonConfigurationInstance()http://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/view/LayoutInflater.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLayoutInflater()http://developer.android.com/reference/android/view/Window.html#getLayoutInflater()http://developer.android.com/reference/android/app/LoaderManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLoaderManager()http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/app/Activity.html#getLocalClassName()http://developer.android.com/reference/android/view/MenuInflater.htmlhttp://developer.android.com/reference/android/app/Activity.html#getMenuInflater()http://developer.android.com/reference/android/view/MenuInflater.htmlhttp://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#getParent()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getParentActivityIntent()http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/content/SharedPreferences.htmlhttp://developer.android.com/reference/android/app/Activity.html#getPreferences(int)http://developer.android.com/reference/android/content/SharedPreferences.html

  • 8/18/2019 Walky Project Doc.format

    27/73

    actiit!.

    oid on*acPressedCalled -/en t/e actiit! /as detected t/e users press o# t/e &ac e!.

    oid onCon#igurationC/angedCon#iguration ne-Con#igCalled &! t/e s!ste+ -/en t/e deice con#iguration c/anges -/ile !our actiit! isrunning.

    oid onContentC/angedT/is /oo is called -/eneer t/e content ie- o# t/e screen c/anges due to a callto :indo-.setContent>ie- or  :indo-.addContent>ie-.

     &oolean onConte;tIte+Selected"enuIte+ ite+T/is /oo is called -/eneer an ite+ in a conte;t +enu is selected.

    oid onConte;t"enuClosed"enu +enuT/is /oo is called -/eneer t/e conte;t +enu is &eing closed eit/er &! t/e usercanceling t/e +enu -it/ t/e &acL+enu &uttonE or -/en an ite+ is selected.

    oid onCreateConte;t"enuConte;t"enu +enuE >ie- E Conte;t"enu.Conte;t"enuIn#o +enuIn#oCalled -/en a conte;t +enu #or t/e ie- is a&out to &e s/o-n.

    C/arSeOuence onCreateDescriptionGenerate a ne- description #or t/is actiit!.

    oid onCreateNaigatepTasStac TasStac*uilder  &uilderDe#ine t/e s!nt/etic tas stac t/at -ill &e generated during p naigation #ro+ adi##erent tas.

     &oolean onCreate,ptions"enu"enu +enuInitialiie- onCreatePanel>ie-int #eatureIdDe#ault i+ple+entation o#  onCreatePanel>ie-int  #or actiities.

     &oolean onCreateT/u+&nail*it+ap out*it+apE Canas canasGenerate a ne- t/u+&nail #or t/is actiit!.

    >ie- onCreate>ie->ie-  parentE String na+eE Conte;t conte;tE Attri&uteSet attrsStandard i+ple+entation o#  onCreate>ie->ie-E StringE Conte;tE Attri&uteSet used-/en in#lating -it/ t/e a!outIn#later returned &!getS!ste+SericeString.

    >ie- onCreate>ie-String na+eE Conte;t conte;tE Attri&uteSet attrsStandard i+ple+entation o#  onCreate>ie-StringE Conte;tE Attri&uteSet used -/enin#lating -it/ t/e a!outIn#later returned &!getS!ste+SericeString.

    oid onDetac/edro+:indo-Called -/en t/e +ain -indo- associated -it/ t/e actiit! /as &een detac/ed #ro+ t/e-indo- +anager.

     &oolean onGeneric"otion'ent"otion'ent eentCalled -/en a generic +otion eent -as not /andled &! an! o# t/e ie-s inside o# t/eactiit!.

     &oolean on?e!Do-nint e!CodeE ?e!'ent eentCalled -/en a e! -as pressed do-n and not /andled &! an! o# t/e ie-s inside o# t/eactiit!.

     &oolean on?e!ongPressint e!CodeE ?e!'ent eentDe#ault i+ple+entation o#  ?e!'ent.Call&ac.on?e!ongPress al-a!s returns #alsedoesnt /andle t/e eent.

     &oolean on?e!"ultipleint e!CodeE int repeatCountE ?e!'ent eent

    27

    http://developer.android.com/reference/android/app/Activity.html#onBackPressed()http://developer.android.com/reference/android/app/Activity.html#onBackPressed()http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)http://developer.android.com/reference/android/content/res/Configuration.htmlhttp://developer.android.com/reference/android/content/res/Configuration.htmlhttp://developer.android.com/reference/android/app/Activity.html#onContentChanged()http://developer.android.com/reference/android/view/Window.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/Window.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/Window.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/Window.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/Window.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/app/Activity.html#onContextItemSelected(android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/app/Activity.html#onContextMenuClosed(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)http://developer.android.com/reference/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)http://developer.android.com/reference/android/view/ContextMenu.htmlhttp://developer.android.com/reference/android/view/ContextMenu.htmlhttp://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/ContextMenu.ContextMenuInfo.htmlhttp://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.htmlhttp://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.htmlhttp://developer.android.com/reference/java/lang/CharSequence.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateDescription()http://developer.android.com/reference/android/app/Activity.html#onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)http://developer.android.com/reference/android/app/TaskStackBuilder.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreatePanelView(int)http://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelView(int)http://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelView(int)http://developer.android.com/reference/android/app/Activity.html#onCreateThumbnail(android.graphics.Bitmap,%20android.graphics.Canvas)http://developer.android.com/reference/android/app/Activity.html#onCreateThumbnail(android.graphics.Bitmap,%20android.graphics.Canvas)http://developer.android.com/reference/android/graphics/Bitmap.htmlhttp://developer.android.com/reference/android/graphics/Bitmap.htmlhttp://developer.android.com/reference/android/graphics/Canvas.htmlhttp://developer.android.com/reference/android/graphics/Canvas.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/util/AttributeSet.htmlhttp://developer.android.com/reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/util/AttributeSet.htmlhttp://developer.android.com/reference/android/util/AttributeSet.htmlhttp://developer.android.com/reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/app/Activity.html#onDetachedFromWindow()http://developer.android.com/reference/android/app/Activity.html#onDetachedFromWindow()http://developer.android.com/reference/android/app/Activity.html#onGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/app/Activity.html#onGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyDown(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyDown(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onBackPressed()http://developer.android.com/reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)http://developer.android.com/reference/android/content/res/Configuration.htmlhttp://developer.android.com/reference/android/app/Activity.html#onContentChanged()http://developer.android.com/reference/android/view/Window.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/Window.html#addContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/app/Activity.html#onContextItemSelected(android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/app/Activity.html#onContextMenuClosed(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu,%20android.view.View,%20android.view.ContextMenu.ContextMenuInfo)http://developer.android.com/reference/android/view/ContextMenu.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ContextMenu.ContextMenuInfo.htmlhttp://developer.android.com/reference/java/lang/CharSequence.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateDescription()http://developer.android.com/reference/android/app/Activity.html#onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)http://developer.android.com/reference/android/app/TaskStackBuilder.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelMenu(int,%20android.view.Menu)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreatePanelView(int)http://developer.android.com/reference/android/view/Window.Callback.html#onCreatePanelView(int)http://developer.android.com/reference/android/app/Activity.html#onCreateThumbnail(android.graphics.Bitmap,%20android.graphics.Canvas)http://developer.android.com/reference/android/graphics/Bitmap.htmlhttp://developer.android.com/reference/android/graphics/Canvas.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/util/AttributeSet.htmlhttp://developer.android.com/reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View,%20java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/java/lang/String.htmlhttp://developer.android.com/reference/android/content/Context.htmlhttp://developer.android.com/reference/android/util/AttributeSet.htmlhttp://developer.android.com/reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String,%20android.content.Context,%20android.util.AttributeSet)http://developer.android.com/reference/android/app/Activity.html#getSystemService(java.lang.String)http://developer.android.com/reference/android/app/Activity.html#onDetachedFromWindow()http://developer.android.com/reference/android/app/Activity.html#onGenericMotionEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyDown(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.html

  • 8/18/2019 Walky Project Doc.format

    28/73

    De#ault i+ple+entation o#  ?e!'ent.Call&ac.on?e!"ultiple al-a!s returns #alsedoesnt /andle t/e eent.

     &oolean on?e!S/ortcutint e!CodeE ?e!'ent eentCalled -/en a e! s/ortcut eent is not /andled &! an! o# t/e ie-s in t/e Actiit!.

     &oolean on?e!pint e!CodeE ?e!'ent eentCalled -/en a e! -as released and not /andled &! an! o# t/e ie-s inside o# t/eactiit!.

    oid ono-"e+or!T/is is called -/en t/e oerall s!ste+ is running lo- on +e+or!E and -ould lieactiel! running process to tr! to tig/ten t/eir &elt.

     &oolean on"enuIte+Selectedint #eatureIdE "enuIte+ ite+De#ault i+ple+entation o#  on"enuIte+SelectedintE "enuIte+ #or actiities.

     &oolean on"enu,penedint #eatureIdE "enu +enuCalled -/en a panels +enu is opened &! t/e user.

     &oolean onNaigatepT/is +et/od is called -/eneer t/e user c/ooses to naigate p -it/in !ourapplications actiit! /ierarc/! #ro+ t/e action &ar.

     &oolean onNaigatepro+C/ildActiit! c/ildT/is is called -/en a c/ild actiit! o# t/is one atte+pts to naigate up.

     &oolean on,ptionsIte+Selected"enuIte+ ite+T/is /oo is called -/eneer an ite+ in !our options +enu is selected.

    oid on,ptions"enuClosed"enu +enuT/is /oo is called -/eneer t/e options +enu is &eing closed eit/er &! t/e usercanceling t/e +enu -it/ t/e &acL+enu &uttonE or -/en an ite+ is selected.

    oid onPanelClosedint #eatureIdE "enu +enuDe#ault i+ple+entation o#  onPanelClosedintE "enu #or actiities.

    oid onPrepareNaigatepTasStac TasStac*uilder  &uilderPrepare t/e s!nt/etic tas stac t/at -ill &e generated during p naigation #ro+ adi##erent tas.

     &oolean onPrepare,ptions"enu"enu +enuPrepare t/e Screens standard options +enu to &e displa!ed.

     &oolean onPreparePanelint #eatureIdE >ie- ie-E "enu +enuDe#ault i+ple+entation o#  onPreparePanelintE >ie-E "enu #or actiities.

    ,&7ect on6etainNonCon#igurationInstance$his method was deprecated in A%I level &" Use the

    new rag+ent  A%I  set6etainInstance&oolean instead( this is also availale on older platforms through the Android compatiility package"

     &oolean onSearc/6eOuestedT/is /oo is called -/en t/e user signals t/e desire to start a searc/.

     &oolean onTouc/'ent"otion'ent eentCalled -/en a touc/ screen eent -as not /andled &! an! o# t/e ie-s under it.

     &oolean onTrac&all'ent"otion'ent eentCalled -/en t/e trac&all -as +oed and not /andled &! an! o# t/e ie-s inside o# t/eactiit!.

    oid onTri+"e+or!int leelCalled -/en t/e operating s!ste+ /as deter+ined t/at it is a good ti+e #or a process totri+ unneeded +e+or! #ro+ its process.

    oid onserInteractionCalled -/eneer a e!E touc/E or trac&all eent is dispatc/ed to t/e actiit!.

    28

    http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyShortcut(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyUp(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyUp(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onLowMemory()http://developer.android.com/reference/android/app/Activity.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/app/Activity.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/view/Window.Callback.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/view/Window.Callback.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/app/Activity.html#onMenuOpened(int,%20android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onMenuOpened(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onNavigateUp()http://developer.android.com/reference/android/app/Activity.html#onNavigateUpFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.html#onNavigateUpFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/app/Activity.html#onOptionsMenuClosed(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Window.Callback.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)http://developer.android.com/reference/android/app/TaskStackBuilder.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPreparePanel(int,%20android.view.View,%20android.view.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/Menu.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onPreparePanel(int,%20android.view.View,%20android.view.Menu)http://developer.android.com/reference/android/view/Window.Callback.html#onPreparePanel(int,%20android.view.View,%20android.view.Menu)http://developer.android.com/reference/java/lang/Object.htmlhttp://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance()http://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/app/Activity.html#onSearchRequested()http://developer.android.com/reference/android/app/Activity.html#onSearchRequested()http://developer.android.com/reference/android/app/Activity.html#onTouchEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/app/Activity.html#onTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onTrimMemory(int)http://developer.android.com/reference/android/app/Activity.html#onUserInteraction()http://developer.android.com/reference/android/app/Activity.html#onUserInteraction()http://developer.android.com/reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int,%20int,%20android.view.KeyEvent)http://developer.android.com/reference/android/app/Activity.html#onKeyShortcut(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onKeyUp(int,%20android.view.KeyEvent)http://developer.android.com/reference/android/view/KeyEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onLowMemory()http://developer.android.com/reference/android/app/Activity.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onMenuItemSelected(int,%20android.view.MenuItem)http://developer.android.com/reference/android/app/Activity.html#onMenuOpened(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onNavigateUp()http://developer.android.com/reference/android/app/Activity.html#onNavigateUpFromChild(android.app.Activity)http://developer.android.com/reference/android/app/Activity.htmlhttp://developer.android.com/reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem)http://developer.android.com/reference/android/view/MenuItem.htmlhttp://developer.android.com/reference/android/app/Activity.html#onOptionsMenuClosed(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onPanelClosed(int,%20android.view.Menu)http://developer.android.com/reference/android/app/Activity.html#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)http://developer.android.com/reference/android/app/TaskStackBuilder.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)http://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/app/Activity.html#onPreparePanel(int,%20android.view.View,%20android.view.Menu)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/Menu.htmlhttp://developer.android.com/reference/android/view/Window.Callback.html#onPreparePanel(int,%20android.view.View,%20android.view.Menu)http://developer.android.com/reference/java/lang/Object.htmlhttp://developer.android.com/reference/android/app/Activity.html#onRetainNonConfigurationInstance()http://developer.android.com/reference/android/app/Fragment.htmlhttp://developer.android.com/reference/android/app/Fragment.html#setRetainInstance(boolean)http://developer.android.com/reference/android/app/Activity.html#onSearchRequested()http://developer.android.com/reference/android/app/Activity.html#onTouchEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onTrackballEvent(android.view.MotionEvent)http://developer.android.com/reference/android/view/MotionEvent.htmlhttp://developer.android.com/reference/android/app/Activity.html#onTrimMemory(int)http://developer.android.com/reference/android/app/Activity.html#onUserInteraction()

  • 8/18/2019 Walky Project Doc.format

    29/73

    oid on:indo-Attri&utesC/anged:indo-"anager.a!outPara+s  para+sT/is is called -/eneer t/e current -indo- attri&utes c/ange.

    oid on:indo-ocusC/anged &oolean /asocusCalled -/en t/e current :indo- o# t/e actiit! gains or loses #ocus.

    Action"ode on:indo-StartingAction"odeAction"ode.Call&ac  call&acGie t/e Actiit! a c/ance to control t/e I #or an action +ode reOuested &! t/e s!ste+.

    oid open,ptions"enuProgra++aticall! opens t/e options +enu.

    oid oerridePendingTransitionint enterAni+E int e;itAni+Call i++ediatel! a#ter one o# t/e #laors o# startActiit!Intent or #inis/ to speci#! ane;plicit transition ani+ation to per#or+ ne;t.

    oid recreateCause t/is Actiit! to &e recreated -it/ a ne- instance.

    oid registerorConte;t"enu>ie- ie-6egisters a conte;t +enu to &e s/o-n #or t/e gien ie- +ultiple ie-s can s/o- t/econte;t +enu.

    #inal oid re+oeDialogint id

    $his method was deprecated in A%I level &" Use the new Dialograg+ent classwith rag+ent"anager  instead( this is also availale on older platforms through the

     Android compatiility package"

    #inal &oolean reOuest:indo-eatureint #eatureId'na&le e;tended -indo- #eatures.

    #inal oid run,niT/read6unna&le action6uns t/e speci#ied action on t/e I t/read.

    oid setContent>ie-int la!out6esIDSet t/e actiit! content #ro+ a la!out resource.

    oid setContent>ie->ie- ie-Set t/e actiit! content to an e;plicit ie-.

    oid setContent>ie->ie- ie-E >ie-Group.a!outPara+s  para+sSet t/e actiit! content to an e;plicit ie-.

    #inal oid setDe#ault?e!"odeint +odeSelect t/e de#ault e! /andling #or t/is actiit!.

    #inal oid seteatureDra-a&leint #eatureIdE Dra-a&le dra-a&leConenience #or calling seteatureDra-a&leintE Dra-a&le.

    #inal oid seteatureDra-a&leAlp/aint #eatureIdE int alp/aConenience #or calling seteatureDra-a&leAlp/aintE int.

    #inal oid seteatureDra-a&le6esourceint #eatureIdE int resIdConenience #or calling seteatureDra-a&le6esourceintE int.

    #inal oid seteatureDra-a&leriint #eatureIdE ri uriConenience #or calling seteatureDra-a&leriintE ri.

    oid setinis/,nTouc/,utside&oolean #inis/Sets -/et/er t/is actiit! is #inis/ed -/en touc/ed outside its -indo-s &ounds.

    oid setIntentIntent ne-IntentC/ange t/e intent returned &! getIntent.

    #inal oid setProgressint progressSets t/e progress #or t/e progress &ars in t/e title.

    #inal oid setProgress*arIndeter+inate &oolean indeter+inate

    29

    http://developer.android.com/reference/android/app/Activity.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)http://developer.android.com/reference/android/view/WindowManager.LayoutParams.htmlhttp://developer.android.com/reference/android/view/WindowManager.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged(boolean)http://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged(boolean)http://developer.android.com/reference/android/view/Window.htmlhttp://developer.android.com/reference/android/view/Window.htmlhttp://developer.android.com/reference/android/view/ActionMode.htmlhttp://developer.android.com/reference/android/app/Activity.html#onWindowStartingActionMode(android.view.ActionMode.Callback)http://developer.android.com/reference/android/view/ActionMode.Callback.htmlhttp://developer.android.com/reference/android/view/ActionMode.Callback.htmlhttp://developer.android.com/reference/android/app/Activity.html#openOptionsMenu()http://developer.android.com/reference/android/app/Activity.html#openOptionsMenu()http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,%20int)http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,%20int)http://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent)http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#recreate()http://developer.android.com/reference/android/app/Activity.html#registerForContextMenu(android.view.View)http://developer.android.com/reference/android/app/Activity.html#registerForContextMenu(android.view.View)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#removeDialog(int)http://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#requestWindowFeature(int)http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)http://developer.android.com/reference/java/lang/Runnable.htmlhttp://developer.android.com/reference/java/lang/Runnable.htmlhttp://developer.android.com/reference/android/app/Activity.html#setContentView(int)http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#setDefaultKeyMode(int)http://developer.android.com/reference/android/app/Activity.html#setDefaultKeyMode(int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)http://developer.android.com/reference/android/graphics/drawable/Drawable.htmlhttp://developer.android.com/reference/android/view/Window.html#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/view/Window.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/view/Window.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableResource(int,%20int)http://developer.android.com/reference/android/view/Window.html#setFeatureDrawableResource(int,%20int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableUri(int,%20android.net.Uri)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableUri(int,%20android.net.Uri)http://developer.android.com/reference/android/net/Uri.htmlhttp://developer.android.com/reference/android/view/Window.html#setFeatureDrawableUri(int,%20android.net.Uri)http://developer.android.com/reference/android/app/Activity.html#setFinishOnTouchOutside(boolean)http://developer.android.com/reference/android/app/Activity.html#setIntent(android.content.Intent)http://developer.android.com/reference/android/app/Activity.html#setIntent(android.content.Intent)http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/android/app/Activity.html#setProgress(int)http://developer.android.com/reference/android/app/Activity.html#setProgress(int)http://developer.android.com/reference/android/app/Activity.html#setProgressBarIndeterminate(boolean)http://developer.android.com/reference/android/app/Activity.html#setProgressBarIndeterminate(boolean)http://developer.android.com/reference/android/app/Activity.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)http://developer.android.com/reference/android/view/WindowManager.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#onWindowFocusChanged(boolean)http://developer.android.com/reference/android/view/Window.htmlhttp://developer.android.com/reference/android/view/ActionMode.htmlhttp://developer.android.com/reference/android/app/Activity.html#onWindowStartingActionMode(android.view.ActionMode.Callback)http://developer.android.com/reference/android/view/ActionMode.Callback.htmlhttp://developer.android.com/reference/android/app/Activity.html#openOptionsMenu()http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,%20int)http://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent)http://developer.android.com/reference/android/app/Activity.html#finish()http://developer.android.com/reference/android/app/Activity.html#recreate()http://developer.android.com/reference/android/app/Activity.html#registerForContextMenu(android.view.View)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#removeDialog(int)http://developer.android.com/reference/android/app/DialogFragment.htmlhttp://developer.android.com/reference/android/app/FragmentManager.htmlhttp://developer.android.com/reference/android/app/Activity.html#requestWindowFeature(int)http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)http://developer.android.com/reference/java/lang/Runnable.htmlhttp://developer.android.com/reference/android/app/Activity.html#setContentView(int)http://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/app/Activity.html#setContentView(android.view.View,%20android.view.ViewGroup.LayoutParams)http://developer.android.com/reference/android/view/View.htmlhttp://developer.android.com/reference/android/view/ViewGroup.LayoutParams.htmlhttp://developer.android.com/reference/android/app/Activity.html#setDefaultKeyMode(int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)http://developer.android.com/reference/android/graphics/drawable/Drawable.htmlhttp://developer.android.com/reference/android/view/Window.html#setFeatureDrawable(int,%20android.graphics.drawable.Drawable)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/view/Window.html#setFeatureDrawableAlpha(int,%20int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableResource(int,%20int)http://developer.android.com/reference/android/view/Window.html#setFeatureDrawableResource(int,%20int)http://developer.android.com/reference/android/app/Activity.html#setFeatureDrawableUri(int,%20android.net.Uri)http://developer.android.com/reference/android/net/Uri.htmlhttp://developer.android.com/reference/android/view/Window.html#setFeatureDrawableUri(int,%20android.net.Uri)http://developer.android.com/reference/android/app/Activity.html#setFinishOnTouchOutside(boolean)http://developer.android.com/reference/android/app/Activity.html#setIntent(android.content.Intent)http://developer.android.com/reference/android/content/Intent.htmlhttp://developer.android.com/reference/android/app/Activity.html#getIntent()http://developer.android.com/reference/android/app/Activity.html#setProgress(int)http://developer.android.com/reference/android/app/Activity.html#setProgressBarIndeterminate(boolean)

  • 8/18/2019 Walky Project Doc.format

    30/73

    Sets -/et/er t/e /oriisi&ilit!&oolean isi&leSets t/e isi&ilit! o# t/e indeter+inate progress &ar in t/e title.

    #inal oid setProgress*ar>isi&ilit!&oolean isi&leSets t/e isi&ilit! o# t/e progress &ar in t/e title.

    oid set6eOuested,rientationint reOuested,rientationC/ange t/e desired orientation o# t/is actiit!.

    anife"t

    AndroidManifest.xml

    'er! application +ust /ae an Android"ani#est.;+l #ile -it/ precisel! t/at na+e inits root director!. T/e +ani#est presents essential in#or+ation a&out t/e application to t/eAndroid s!ste+E in#or+ation t/e s!ste+ +ust /ae &e#ore it can run an! o# t/eapplications code. A+ong ot/er t/ingsE t/e +ani#est does t/e #ollo-ing

    • It na+es t/e aa pacage #or t/e application. T/e pacage na+e seres as auniOue identi#ier #or t/e application.

    • It descri&es t/e co+ponents o# t/e application t/e actiitiesE sericesE &roadcast receiersE and content proiders t/at t/e application is co+posed o#. Itna+es t/e classes t/at i+ple+ent eac/ o# t/e co+ponents and pu&lis/es t/eircapa&ilities #or e;a+pleE -/ic/ Intent +essages t/e! can /andle. T/ese declarationslet t/e Android s!ste+ no- -/at t/e c


Recommended