1. #1
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    84
    Vote Rating
    20
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default SDK Tools with PhoneGap

    SDK Tools with PhoneGap


    Can the SDK tools build scripts not handle PhoneGap builds?

    If I try to do something as simple as
    Code:
    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, onSuccess, null);
    I get the following error when trying to build for testing.
    Error thown from your application with message: ReferenceError: Can't find variable: LocalFileSystem

    Is there something special I need to do to use PhoneGap features that are not abstracted by sencha? I understand I am not building a phonegap app with the SDK tools but I need to package it for PhoneGap. Is this possible?

    FYI I am on windows 7 64-bit with SenchaSDKTools-2.0.0-beta2 using Cordova 1.5

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,756
    Vote Rating
    828
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The SDK Tools does not build for PhoneGap. The build for native is for the Sencha native wrapper.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    84
    Vote Rating
    20
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    I do completely understand that and I am not trying to build a PhoneGap app WITH the SDK Tools I am trying to package my Sencha app FOR PhoneGap.

    I am using:
    Code:
    sencha app build package
    Once it is packaged I want to copy this into my PhoneGap Android Project (assets/www) and package this using PhoneGap.

    Is this not possible with the SDK tools? If not how does one go about using PhoneGap API's with Sencha that are not abstracted, FILE API specifically. How does one package a sencha application for use with phonegap?

    thanks
    -ross

  4. #4
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    84
    Vote Rating
    20
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      0  

    Default


    For now I have come up with a workaround. Before doing any calls to Cordova I do a check like this
    Code:
    Ext.browser.is.WebView && Ext.browser.is.PhoneGap && !Ext.os.is.Desktop
    This way when the "compiler" runs it will not step in there and not throw errors on undefined things, but when the application is deployed into a working phonegap environment everything is peachy keen.

    I have also made a quick utility getter to make this faster (cordova.enabled) but that's not as important. This should be enough for me to start working with Sencha touch 2 AND phonegap correctly.

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    9
    Vote Rating
    0
    jdesmedt is on a distinguished road

      0  

    Default


    I have tried your suggestions, but for some reason, it doesn't work:
    Ext.Msg.alert("Info", "webView: "+Ext.browser.is.WebView+" / Phonegap: "+Ext.browser.is.PhoneGap+" / Desktop: "+Ext.os.is.Desktop);

    displays an alert, but with following text:
    webView: false / Phonegap: undefined / Desktop: undefined

    What am I missing?

    Thanks!
    Last edited by jdesmedt; 4 Apr 2012 at 2:23 AM. Reason: typo

  6. #6
    Sencha User
    Join Date
    Mar 2012
    Posts
    9
    Vote Rating
    0
    jdesmedt is on a distinguished road

      0  

    Default


    I have found a way to make the compiler stop complaining, but I'm still not getting everything working.
    I want to access the device.platform property, but when I try that, I get an error: ReferenceError: device is not defined.

    What am I doing wrong? Could you provide a minimal project that combines Phonegap & Sencha (& is built with the SDK tools?)

    Thanks!

  7. #7
    Sencha - Sencha Touch Dev Team
    Join Date
    Oct 2010
    Posts
    84
    Vote Rating
    20
    RossGerbasi will become famous soon enough RossGerbasi will become famous soon enough

      -1  

    Default


    Whoops! I forgot to include this also sorry I am back and forth between multiple forum issues here.

    Cordova 1.5.0 for iOS has broken sencha support. They removed the global PhoneGap object and replaced it with a Cordova object but unlike the Android version of the JS they did not provide a backwards compatibility in the iOS version.

    Details on a fix here
    http://www.sencha.com/forum/showthread.php?192354-Ext.device-problem&p=771704&viewfull=1#post771704

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi