1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    joinsky is on a distinguished road

      0  

    Default Sencha Touch and PhoneGap

    On the overview page of sencha touch it is written that Sencha Touch works hand in hand with PhoneGap and it is also written :"PhoneGap also enables developers to utilize native device APIs — like the Camera and Contact list — directly in JavaScript."

    How can Sencha Touch work hand in hand with PhoneGap. PhoneGap surely has a different API than Sencha Touch.

  2. #2
    Sencha User
    Join Date
    Aug 2010
    Posts
    304
    Vote Rating
    3
    steve1964 is on a distinguished road

      0  

    Default

    Phonegap use a javascript api to access native functionality of the devices, Sencha Touch is a javascript framework, so where is the problem?

    http://www.sencha.com/learn/Tutorial..._with_PhoneGap

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    joinsky is on a distinguished road

      0  

    Default

    can you access e.g. the camera with Sencha Touch or can you access or build anything with Sencha Touch, which you could also do with PhoneGap?

  4. #4
    Touch Premium Member
    Join Date
    Sep 2008
    Location
    Orange County, CA, USA
    Posts
    186
    Vote Rating
    0
    Jack9 is on a distinguished road

      0  

    Default AFAIK

    I've played with phonegap a bit. Phonegap has it's own javascript API for doing things that are outside of what Sencha Touch allows you to do. The vast majority of my Sencha Touch code required 0 changes to have phonegap build and deploy to my iphone correctly. If I wanted Camera access (let's say to take a picture and show it), I would access the phone and take the picture via the phonegap api, locate the file with the phonegap api, then build what I could in sencha to display a file, then hook it together.

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    joinsky is on a distinguished road

      0  

    Default

    Do you know how PhoneGap builds a native App out of you Web-App which you have created using Sencha Touch? Does it have a Compiler or anything like that or how else can Phonegap build a native APP out of a HTML file?

  6. #6
    Sencha User
    Join Date
    Aug 2010
    Posts
    304
    Vote Rating
    3
    steve1964 is on a distinguished road

      0  

    Default

    Phonegap dont build an app starting from html/javascript/css (as titanium appcelerator do), it's simply wrap this stuff in a webui, for more detail http://www.phonegap.com/start

  7. #7
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    joinsky is on a distinguished road

      0  

    Default

    Can you acess the camera or other native functions of a plaftorm (e.g. Contact, geolocations etc.) with Sencha Touch?

  8. #8
    Touch Premium Member
    Join Date
    Sep 2008
    Location
    Orange County, CA, USA
    Posts
    186
    Vote Rating
    0
    Jack9 is on a distinguished road

      0  

    Default

    Do you know how PhoneGap builds a native App out of you Web-App which you have created using Sencha Touch? Does it have a Compiler or anything like that or how else can Phonegap build a native APP out of a HTML file?
    It uses the Webkit Safari libraries. You have to use XCode to compile, of course, but it's relatively painless. Move the Ext.Setup(...) into a PhoneGap javascript bootstrap method like dobodyonload or something and you're basically ready to compile.

  9. #9
    Sencha User
    Join Date
    Jun 2011
    Posts
    16
    Vote Rating
    0
    joinsky is on a distinguished road

      0  

    Default

    Can you acess the camera or other native functions of a plaftorm (e.g. Contact, geolocations etc.) with Sencha Touch?

  10. #10
    Touch Premium Member
    Join Date
    Sep 2008
    Location
    Orange County, CA, USA
    Posts
    186
    Vote Rating
    0
    Jack9 is on a distinguished road

      0  

    Default Answer

    Can you acess the camera or other native functions of a plaftorm (e.g. Contact, geolocations etc.) with Sencha Touch?
    This is documented all over both PhoneGap and Sencha-Touch (it's on the main product page).

    No.

    That's part of what PhoneGap is for. To bridge the gap between webkit and the phone. Phone Gap.

Thread Participants: 3