phonegap jeter

Upload: daiphanvan

Post on 13-Apr-2018

253 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Phonegap Jeter

    1/22

    04/03/11 presented by Lukas Jeter 1

    PhoneGap

    The open source mobile framework

    that supports platforms

    presented by Lukas Jeter

  • 7/27/2019 Phonegap Jeter

    2/22

    04/03/11 presented by Lukas Jeter !

    "hat is PhoneGap#

    PhoneGap is a framework that is based on the openstandards of $T%L& and allows de'elopers to use

    common web technolo(ies )$T%L* +,,* andJa'a,cript- to build applications for multiple mobile

    platforms from a sin(le code base.

  • 7/27/2019 Phonegap Jeter

    3/22

    04/03/11 presented by Lukas Jeter 3

    $istory

    Proect started at an iPhonee'+amp in,an 2rancisco* by cocreators rock"hitten and 5ob 6llis

    "on People7s +hoice 8ward at 975eilly%edia7s !00: "eb !.0 +onference

    ;nitially supported iPhone* 8ndroid andlackerry

    +urrently de'eloped by

  • 7/27/2019 Phonegap Jeter

    4/22

    04/03/11 presented by Lukas Jeter 4

    "ith PhoneGap you can

    Take ad'anta(e of $T%L& and +,, =se Ja'a,cript to write your code

    8ccess

  • 7/27/2019 Phonegap Jeter

    5/22

    04/03/11 presented by Lukas Jeter &

    ,upported features

  • 7/27/2019 Phonegap Jeter

    6/22

    04/03/11 presented by Lukas Jeter

    PhoneGap Tools

    ecause PhoneGap isan open source*communitysupported proect*

    many e>tensions tothe basic frameworkare a'ailable.

    6>amples? Plu(ins

    @ arcode ,canner

    @ 2ile =ploader

    Ja'a,cript libraries

    @ JAuery %obile

    @ The oo Toolkit

    Tools@ ,encha Touch

  • 7/27/2019 Phonegap Jeter

    7/22

    04/03/11 presented by Lukas Jeter B

    $ow it works

    1. ;nstall the nati'e sdk of your tar(et mobileplatform

    !. ownload the PhoneGap Cip file

    3. ,etup a new proect in the tar(et platform

    with PhoneGap parameters4. "rite $T%L D Ja'a,cript mobile application

    &. uild D deploy usin( tar(et platform7s ,E

    2or platformspecific stepbystep instructionssee? http?//www.phone(ap.com/start

    http://www.phonegap.com/starthttp://www.phonegap.com/starthttp://www.phonegap.com/starthttp://www.phonegap.com/start
  • 7/27/2019 Phonegap Jeter

    8/22

    04/03/11 presented by Lukas Jeter F

    "rite once. +ompile in the cloud.5un anywhere.H

  • 7/27/2019 Phonegap Jeter

    9/22

    04/03/11 presented by Lukas Jeter :

    The PhoneGap uild ser'ice

    "rite app usin( $T%L* +,, or Ja'a,cript =pload it to the PhoneGap uild ser'ice

    Get back appstore ready apps for 8pple i9,*8ndroid* Palm* ,ymbian* lackerry

    +urrent de'elopment to also support"indows* %eeGo and ada

    PhoneGap uild ser'ice is currently in betatestin( and is free to re(ister and use

    "ill remain free for open source proects

    https?//build.phone(ap.com/

    https://build.phonegap.com/https://build.phonegap.com/https://build.phonegap.com/https://build.phonegap.com/
  • 7/27/2019 Phonegap Jeter

    10/22

    04/03/11 presented by Lukas Jeter 10

    8P; 5eference

    AccelerometerTap into the device's

    motion sensor.

    CompassObtain the direction

    that the device is

    pointing.

    Device

    Gather device specific

    information.

    CameraCapture a photo using

    the device's camera.

    ContactsWork with the devices

    contact database.

    vents

    !ook into native

    events through

    "ava#cript.

    http://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_compass_compass.md.htmlhttp://docs.phonegap.com/phonegap_device_device.md.htmlhttp://docs.phonegap.com/phonegap_camera_camera.md.htmlhttp://docs.phonegap.com/phonegap_contacts_contacts.md.htmlhttp://docs.phonegap.com/phonegap_events_events.md.htmlhttp://docs.phonegap.com/phonegap_events_events.md.htmlhttp://docs.phonegap.com/phonegap_contacts_contacts.md.htmlhttp://docs.phonegap.com/phonegap_camera_camera.md.htmlhttp://docs.phonegap.com/phonegap_device_device.md.htmlhttp://docs.phonegap.com/phonegap_compass_compass.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.html
  • 7/27/2019 Phonegap Jeter

    11/22

    04/03/11 presented by Lukas Jeter 11

    8P; 5eference* continued

    $ile!ook into native file

    s%stem through"ava#cript.

    &edia

    ecord and pla% backaudio files.

    (otification)isual* audible* and

    tactile devicenotifications.

    Geolocation&ake %our application

    location aware.

    (etwork+uickl% check the

    network state.

    #torage

    !ook into the devices

    native storage

    options.

    http://docs.phonegap.com/phonegap_file_file.md.htmlhttp://docs.phonegap.com/phonegap_media_media.md.htmlhttp://docs.phonegap.com/phonegap_notification_notification.md.htmlhttp://docs.phonegap.com/phonegap_geolocation_geolocation.md.htmlhttp://docs.phonegap.com/phonegap_network_network.md.htmlhttp://docs.phonegap.com/phonegap_storage_storage.md.htmlhttp://docs.phonegap.com/phonegap_storage_storage.md.htmlhttp://docs.phonegap.com/phonegap_network_network.md.htmlhttp://docs.phonegap.com/phonegap_geolocation_geolocation.md.htmlhttp://docs.phonegap.com/phonegap_notification_notification.md.htmlhttp://docs.phonegap.com/phonegap_media_media.md.htmlhttp://docs.phonegap.com/phonegap_file_file.md.html
  • 7/27/2019 Phonegap Jeter

    12/22

    04/03/11 presented by Lukas Jeter 1!

    8P; 5eference* class e>ample

    AccelerometerCaptures device motion in the ,* %* and - direction.Methods

    accelerometer.getCurrentAcceleration

    accelerometer.watchAcceleration accelerometer.clearWatch

    A r g u m e n t s

    accelerometer#uccess

    accelerometerrror accelerometerOptions

    O b je c t s (R e a d -O n ly )

    Acceleration

    http://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.html
  • 7/27/2019 Phonegap Jeter

    13/22

    04/03/11 presented by Lukas Jeter 13

    8P; 5eference* method e>ample

    accelerometer.getCurrentAccelerationGet the current acceleration along the ,* %* and - a,is.

    navigator.accelerometer.getCurrentAcceleration(

    accelerometerSuccess, accelerometerError);

    De s c rip t ion :

    The accelerometer is a motion sensor that detects the change /delta0 inmovement relative to the current device orientation. The accelerometer can

    detect 1D movement along the ,* %* and - a,is.

    The acceleration is returned using theaccelerometerSuccesscallback

    function.

    S u pp o rt e d P la t o rm s :

    Android

    3lack3err% WebWorks /O# 4.5 and higher0

    i6hone

    http://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.html
  • 7/27/2019 Phonegap Jeter

    14/22

    04/03/11 presented by Lukas Jeter 14

    8P; 5eference* method e>ample cont.

    ! u i c " # $ a m p l e :

    function onSuccess(acceleration) { alert('AccelerationX: ' + acceleration. + '!n' + 'Acceleration": ' + acceleration.# + '!n' + 'Acceleration$: ' + acceleration.% + '!n' + '&imestam: ' + acceleration.timestam +

    '!n');;

    function onError() { alert('onError');;

    navigator.accelerometer.getCurrentAcceleration(onSuccess,onError);

    iP h on e !u ir" s :

    i6hone doesn't have the concept of getting the current acceleration at an% givenpoint.

    7ou must watch the acceleration and capture the data at given time intervals.

    Thus* the getCurrentAccelerationfunction will give %ou the last value

    reported from a *onea atc*Accelerometercall.

    http://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.htmlhttp://docs.phonegap.com/phonegap_accelerometer_accelerometer.md.html
  • 7/27/2019 Phonegap Jeter

    15/22

    04/03/11 presented by Lukas Jeter 1&

    $ello PhoneGap? inde>.html

    89DOCT76 !T&:;

    8html; 8head;

    8title;6honeGap8

  • 7/27/2019 Phonegap Jeter

    16/22

    04/03/11 presented by Lukas Jeter 1

    ,ample app? screenshot

  • 7/27/2019 Phonegap Jeter

    17/22

    04/03/11 presented by Lukas Jeter 1B

    "ho uses PhoneGap#

    JustOneMoreb y R ib o t L im ite d Designed to help you discover inspiring video content Just One More provides a simple, addictive

    interface that brings the very best of Vimeo to the iPad/iPhone. aunched on the !pp "tore in

    #ebruary and built using $eb%only technologies this free app sho$s that you really can ma&e

    immersive, content%rich mobile apps using the latest in '(M), *""+ and Java"cript.

    Orbiumb y B j rn N ils s o n#ast moving action/pule game $ith high -uality graphics and touch screen optimied controls.(he aim is for it to $or& in any bro$ser, both mobile and des&top. Phoneap for app store

    prescence.

    harmonious.b y Th e A n g ry R o b o t

    Zo m b ie F a c to ry 'armonious is a smart0 s&etchpad that uses the lines you1ve already dra$n to influence ne$ lines.

    2ou can create some really artistic pieces and then upload them to the harmoniousapp.com gallery

    site. 3t uses the 'armony library from Mrdoob, 45(ouch for interactions and the lyphish icons,

    then $raps the $hole thing up in Phoneap.

  • 7/27/2019 Phonegap Jeter

    18/22

    04/03/11 presented by Lukas Jeter 1F

    Eey enefits

    Requires knowledge of common web technologies

    (HTML, CSS, J!Scri"t# rther thn multi"le

    distinct mobile "ltforms

    $"en source % cn be ltered or e&tended b'

    n'one

    Currentl' offers the widest mor "ltform

    co!erge mong other similr frmeworks

  • 7/27/2019 Phonegap Jeter

    19/22

    04/03/11 presented by Lukas Jeter 1:

    Limitations

    8pplications are rendered usin( theplatforms7 web browser en(ine* not

    with the nati'e =; obects

    oesn7t support e'erya'ailable

    platformI yet

  • 7/27/2019 Phonegap Jeter

    20/22

    04/03/11 presented by Lukas Jeter !0

    5esources

    PhoneGap ocs? docs.phonegap.com PhoneGap "iki? $i&i.phonegap.com

    PhoneGap Goo(le Group? (he

    Phoneap oogle roup PhoneGap ;5+?

    @ ,er'er? irc.freenode.net

    @ +hannel? phone(ap

    http://docs.phonegap.com/http://wiki.phonegap.com/http://groups.google.com/group/phonegaphttp://groups.google.com/group/phonegaphttp://groups.google.com/group/phonegaphttp://groups.google.com/group/phonegaphttp://groups.google.com/group/phonegaphttp://wiki.phonegap.com/http://wiki.phonegap.com/http://wiki.phonegap.com/http://wiki.phonegap.com/http://docs.phonegap.com/http://docs.phonegap.com/http://docs.phonegap.com/
  • 7/27/2019 Phonegap Jeter

    21/22

    04/03/11 presented by Lukas Jeter !1

    ,upport Packa(es

    Typical support packa(es are a'ailableto enterprise customers

    ,er'ices include pri'ate forums* phoneand email support* trainin(* etc.

    Prices ran(e from K!&0/yr to

    K&0*000/yr

  • 7/27/2019 Phonegap Jeter

    22/22

    04/03/11 presented by Lukas Jeter !!

    2or more info D to download theframework

    www.phone(ap.com

    Thank ouM

    http://www.phonegap.com/http://www.phonegap.com/