Mobile Computing 2

Embed Size (px)

Citation preview

  • 8/18/2019 Mobile Computing 2

    1/82

    MOBILE COMPUTINGMODUL-2 : Dasar-dasar Mobile Programming

    Referensi:

    ! "ir#$s%e&!al%!!'MobileDe(elo)erG$ide'

    2! *eog+%,! Com)le&e Referen.e ,2ME'

    /! Go0al%"!%',2ME T$&orial'

  • 8/18/2019 Mobile Computing 2

    2/82

    Penda+$l$an

    • Pre-re1$isi&e : sd+ biasa memb$a&)rogram ,a(a% 0ang bel$m sila+#an belaarsendiri )emrograman ,a(a2 3E

    • Ma&a#$lia+ ini mengg$na#an )la&form ,2ME% 4T* 2!2

    • Ins&all d$l$ ,a(a2 3E (ersi 5 6d#-$2-

    7indo7s-i895-)!ee;• *em$dian ins&all : a(a2me

  • 8/18/2019 Mobile Computing 2

    3/82

  • 8/18/2019 Mobile Computing 2

    4/82

  • 8/18/2019 Mobile Computing 2

    5/82

  • 8/18/2019 Mobile Computing 2

    6/82

  • 8/18/2019 Mobile Computing 2

    7/82

  • 8/18/2019 Mobile Computing 2

    8/82

  • 8/18/2019 Mobile Computing 2

    9/82

  • 8/18/2019 Mobile Computing 2

    10/82

  • 8/18/2019 Mobile Computing 2

    11/82

  • 8/18/2019 Mobile Computing 2

    12/82

  • 8/18/2019 Mobile Computing 2

    13/82

  • 8/18/2019 Mobile Computing 2

    14/82

  • 8/18/2019 Mobile Computing 2

    15/82

  • 8/18/2019 Mobile Computing 2

    16/82

  • 8/18/2019 Mobile Computing 2

    17/82

  • 8/18/2019 Mobile Computing 2

    18/82

  • 8/18/2019 Mobile Computing 2

    19/82

  • 8/18/2019 Mobile Computing 2

    20/82

  • 8/18/2019 Mobile Computing 2

    21/82

  • 8/18/2019 Mobile Computing 2

    22/82

  • 8/18/2019 Mobile Computing 2

    23/82

  • 8/18/2019 Mobile Computing 2

    24/82

  • 8/18/2019 Mobile Computing 2

    25/82

  • 8/18/2019 Mobile Computing 2

    26/82

  • 8/18/2019 Mobile Computing 2

    27/82

  • 8/18/2019 Mobile Computing 2

    28/82

  • 8/18/2019 Mobile Computing 2

    29/82

  • 8/18/2019 Mobile Computing 2

    30/82

  • 8/18/2019 Mobile Computing 2

    31/82

  • 8/18/2019 Mobile Computing 2

    32/82

    O(er(ie7

     ,a(a= 2 Pla&form% Mi.ro Edi&ion 6,2ME=; is &+e se.ondre(ol$&ion in ,a(a>s s+or& +is&or0! 4+en ,a(a 7asin&rod$.ed in ??8% i& loo#ed li#e &+e f$&$re of.om)$&ing 7as in applets, small programs thatcould be downloaded and run on demand. A slow

    In&erne& for.ed a))le&s o$& of &+e mains&ream! ,a(a%as a )la&form% did no& reall0 &a#e o@ $n&il &+e ad(en&of servlets, Java )rograms &+a& r$n on a ser(er6essen&iall0 a re)la.emen& for CGI;! ,a(a f$r&+er

    e)anded in&o &+e ser(er side of &+ings% e(en&$all0)i.#ing $) &+e moni#er of ,a(a 2 Pla&form% En&er)riseEdi&ion 6,2EE=;! T+is 7as &+e Ars& re(ol$&ion% &+ebli& of ser(er-side ,a(a!

  • 8/18/2019 Mobile Computing 2

    33/82

    •  T+e se.ond re(ol$&ion is &+e e)losionof small-de(i.e ,a(a% and i&>s +a))eningno7! T+e mar#e& for small de(i.es is

    e)anding ra)idl0% and ,a(a is im)or&an&for &7o reasons! irs&% de(elo)ers .an7ri&e .ode and +a(e i& r$n on doens ofsmall )la&forms% 7i&+o$& .+ange!3e.ond% ,a(a +as some im)or&an& safe&0fea&$res for do7nloadable .ode!

  • 8/18/2019 Mobile Computing 2

    34/82

  • 8/18/2019 Mobile Computing 2

    35/82

  • 8/18/2019 Mobile Computing 2

    36/82

  • 8/18/2019 Mobile Computing 2

    37/82

  • 8/18/2019 Mobile Computing 2

    38/82

  • 8/18/2019 Mobile Computing 2

    39/82

  • 8/18/2019 Mobile Computing 2

    40/82

  • 8/18/2019 Mobile Computing 2

    41/82

    Unders&anding ,2ME ,2ME isn>& reall0 a s)e.iA. )ie.e of sof&7are or s)e.iA.a&ion!

    ll i& means is ,a(a for small de(i.es! 3mall de(i.es rangein sie from )agers% mobile )+ones% )ersonal digi&alassis&an&s 6PDs;% all &+e 7a0 $) &o &+ings li#e se&-&o)boes &+a& are $s& s+0 of being des#&o) PCs!

     ,2ME is di(ided in&o confgurations and profles, which provide specifc inormation about APIs and dierentamilies o de(i.es! .onAg$ra&ion is designed for as)e.iA. #ind of de(i.e based on memor0 .ons&rain&s and)ro.essor )o7er! I& $s$all0 s)e.iAes a ,a(a "ir&$al Ma.+ine6,"M; &+a& .an be easil0 )or&ed &o de(i.es s$))or&ing &+e

    .onAg$ra&ion! I& also s)e.iAes some s$bse& of &+e ,a(a 2Pla&form% 3&andard Edi&ion 6,23E=; PIs &+a& 7ill be $sedon &+e )la&form% as 7ell as addi&ional PIs &+a& ma0 bene.essar0!

  • 8/18/2019 Mobile Computing 2

    42/82

  • 8/18/2019 Mobile Computing 2

    43/82

  • 8/18/2019 Mobile Computing 2

    44/82

  • 8/18/2019 Mobile Computing 2

    45/82

  • 8/18/2019 Mobile Computing 2

    46/82

  • 8/18/2019 Mobile Computing 2

    47/82

  • 8/18/2019 Mobile Computing 2

    48/82

  • 8/18/2019 Mobile Computing 2

    49/82

  • 8/18/2019 Mobile Computing 2

    50/82

  • 8/18/2019 Mobile Computing 2

    51/82

  • 8/18/2019 Mobile Computing 2

    52/82

  • 8/18/2019 Mobile Computing 2

    53/82

    im)or& a(a $&il Da&e

  • 8/18/2019 Mobile Computing 2

    54/82

    im)or& a(a!$&il!Da&e

    im)or& a(a!mi.roedi&ion!l.d$i!ler&

    im)or& a(a!mi.roedi&ion!l.d$i!Dis)la0

    im)or& a(a!mi.roedi&ion!midle&!MIDle&

    )$bli. .lass Da&eTime)) e&ends MIDle& Fler& &imeler&

    )$bli. Da&eTime))6; F

    &imeler& ne7 ler&6Hler&H;

    &imeler&!se&3&ring6ne7 Da&e6;!&o3&ring6;;

    J

    )$bli. (oid s&ar&))6; F

    Dis)la0!ge&Dis)la06&+is;!se&C$rren&6&imeler&;

    J

    )$bli. (oid )a$se))6; F

    J

    )$bli. (oid des&ro0))6boolean $n.ondi&ional; F

    J

    J

  • 8/18/2019 Mobile Computing 2

    55/82

  • 8/18/2019 Mobile Computing 2

    56/82

  • 8/18/2019 Mobile Computing 2

    57/82

  • 8/18/2019 Mobile Computing 2

    58/82

  • 8/18/2019 Mobile Computing 2

    59/82

  • 8/18/2019 Mobile Computing 2

    60/82

  • 8/18/2019 Mobile Computing 2

    61/82

  • 8/18/2019 Mobile Computing 2

    62/82

  • 8/18/2019 Mobile Computing 2

    63/82

  • 8/18/2019 Mobile Computing 2

    64/82

  • 8/18/2019 Mobile Computing 2

    65/82

  • 8/18/2019 Mobile Computing 2

    66/82

  • 8/18/2019 Mobile Computing 2

    67/82

  • 8/18/2019 Mobile Computing 2

    68/82

  • 8/18/2019 Mobile Computing 2

    69/82

  • 8/18/2019 Mobile Computing 2

    70/82

  • 8/18/2019 Mobile Computing 2

    71/82

  • 8/18/2019 Mobile Computing 2

    72/82

  • 8/18/2019 Mobile Computing 2

    73/82

  • 8/18/2019 Mobile Computing 2

    74/82

  • 8/18/2019 Mobile Computing 2

    75/82

  • 8/18/2019 Mobile Computing 2

    76/82

  • 8/18/2019 Mobile Computing 2

    77/82

  • 8/18/2019 Mobile Computing 2

    78/82

  • 8/18/2019 Mobile Computing 2

    79/82

    MIDl K ll

  • 8/18/2019 Mobile Computing 2

    80/82

    MIDle& Kello

    im)or& a(a!mi.roedi&ion!midle&!im)or& a(a!mi.roedi&ion!l.d$i!

    )$bli. .lass KelloMIDle& e&ends MIDle& im)lemen&sCommandLis&ener F

      )ri(a&e Command ei&Command T+e ei& .ommand

      )ri(a&e Dis)la0 dis)la0 T+e dis)la0 for &+is MIDle&

      )$bli. KelloMIDle&6; F  dis)la0 Dis)la0!ge&Dis)la06&+is;

      ei&Command ne7 Command6HEi&H% Command!EIT% ;

      J

    )$bli. (oid s&ar&))6; F

  • 8/18/2019 Mobile Computing 2

    81/82

    )$bli. (oid s&ar&))6; F

      Te&Bo & ne7 Te&Bo6HKelloH% HKello% 4orld Kello ,MEH% 285% ;

      &!addCommand6ei&Command;

      &!se&CommandLis&ener6&+is;

      dis)la0!se&C$rren&6&;

      J

      )$bli. (oid )a$se))6; F

      J

      )$bli. (oid des&ro0))6boolean $n.ondi&ional; F

      J

      )$bli. (oid .ommand.&ion6Command .% Dis)la0able s; F

      if 6. ei&Command; F  des&ro0))6false;

      no&if0Des&ro0ed6;

      J

    J

    J

  • 8/18/2019 Mobile Computing 2

    82/82