1. #1
    Sencha User
    Join Date
    May 2014
    Posts
    32
    Answers
    2
    Vote Rating
    0
    patrickkidd is on a distinguished road

      0  

    Default Answered: Using cordova or phonegap plugins in sencha code

    Answered: Using cordova or phonegap plugins in sencha code


    After a bunch of goggling, it seems clear how to init cordova/phonegap within a sencha app and how to add phonegap/cordova plugins, but not how to make the plugins available from the sencha code. I am developing mobile apps starting out with serving the sencha HTML and debugging in Safari, and while the plugin's javascript objects appear to be available from the cordova/phonegap html, they are not available from the sencha HTML.

    Considering you have to develop with the sencha HTML, how does one develop using the installed plugins?

    Thanks!

  2. try to run follow command:
    cordova prepare

    in folder with cordova.js must appear cordova_plugins.js

  3. #2
    Sencha User
    Join Date
    May 2012
    Location
    Belarus, Gomel
    Posts
    42
    Answers
    3
    Vote Rating
    -1
    dmitryfisko is an unknown quantity at this point

      0  

    Default


    include cordova.js in index.html. he automatically read included plugins in cordova_plugins.js and make available it from sencha app

  4. #3
    Sencha User
    Join Date
    May 2014
    Posts
    32
    Answers
    2
    Vote Rating
    0
    patrickkidd is on a distinguished road

      0  

    Default This this?

    This this?


    I added this into <sencha root>/index.html

    <scriptsrc="phonegap/platforms/ios/www/phonegap.js"type="text/javascript"></script>

    I added the StatusBar plugin like this:

    turin:phonegap patrick$ phonegap plugin add https://github.com/phonegap-build/StatusBarPlugin.git
    [phonegap] adding the plugin: https://github.com/phonegap-build/StatusBarPlugin.git
    [phonegap] successfully added the plugin
    turin:phonegap patrick$

    but am not seeing the StatusBar object on the window.

  5. #4
    Sencha User
    Join Date
    May 2012
    Location
    Belarus, Gomel
    Posts
    42
    Answers
    3
    Vote Rating
    -1
    dmitryfisko is an unknown quantity at this point

      0  

    Default


    try to run follow command:
    cordova prepare

    in folder with cordova.js must appear cordova_plugins.js

Thread Participants: 1

Tags for this Thread