how to get reference of cordova's plugins in Sencha Touch code

Franva

I am about to add some plugins into my cordova project. But the cordova project is generated by Sencha Touch 2.

So if I added a plugin under cordova,

how to get reference of cordova's plugins in Sencha Touch code?(As Sencha Touch code is ONE level ABOVE cordova's plugin)

And I should not touch the generated cordova code as it will be replaced every time when I re-generate cordova project by using Sencha Touch CMD commands.


Update

I'd like to clarify my question by giving a scenario :

For example, I'd like to use camera in Sencha Touch code, but getting access of the native resources in a mobile phone is done by using Cordova plugins. And when running Sencha Touch command to generate Cordova project, all code under cordova folder will be overwritten, so cannot do the coding under cordova folder, that's why all coding must be done in Sencha Touch level.

Therefore, the problem becomes-> how can I get access to camera in sencha touch code if the plugin is under cordova's scope which means the access of cordova plugins are out of the scope of Sencha Touch.

To make it more clear, here is the structure of a Sencha Touch project which contains Cordova project:

Root folder for Sencha Touch Project
-app
-cordova
  -plugins
-...

so as you can see, plugins are under cordova folder so I don't know how to get a reference of the camera plugin like:

Ext.navigator.camera.function() (like this?)

in Sencha Touch code.

I hope my explanation makes sense to you.

Thank you.

Vlad Stirbu

Cordova plugins declare in their manifest (e.g. plugin.xml), using the clobbers element how the functionality is exposed inside the browser runtime. The target attribute value is the added to the window object and can be used right after deviceready event is fired.

More information about plugin.xml and clobbers can be found here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how to get reference of cordova's plugins in Sencha Touch code

From Dev

Cordova and Sencha Touch

From Dev

Get container's record on "initialize" in Sencha Touch

From Dev

Sencha Touch: how to get config from tpl?

From Dev

How to get device language in sencha touch or architect

From Dev

Sencha Touch: how to get config from tpl?

From Dev

How to get device language in sencha touch or architect

From Dev

How to change splash screen in sencha touch cordova app

From Dev

Sencha touch will not build using Cordova

From Dev

Sencha touch will not build using Cordova

From Dev

Code assist - Sencha Touch

From Dev

how to reference itemTpl by its attribute myId in sencha touch

From Dev

Sencha Touch : how to reference tab bar item from controller?

From Dev

cordova plugin cannot be properly installed in sencha touch

From Dev

Sencha Touch cordova.local.properties is missing

From Dev

How to get Highchart Gauge to work in Sencha Touch 2

From Dev

How to get only gps location using sencha touch?

From Dev

How can I get list selected items in sencha touch 2.3.1

From Dev

how to get total records with a previous filter in a Sencha Touch app?

From Dev

How to get the DOM element for a Sencha Touch draw component

From Dev

How to get rid of items padding in a Sencha Touch List?

From Dev

Sencha Touch 2 How to get selected itemTpl in a list

From Dev

How to get the value of the item of list Template in sencha touch?

From Dev

How to get circle markerimage google map in sencha touch

From Dev

Sencha Touch 2: How to get (multiple) instances of a base class

From Dev

Get Sencha Touch Platform Name

From Dev

sencha touch list tpl event reference

From Dev

unable to get parent reference in sencha touch when calling function is in html attribute

From Dev

How to use Database in Sencha Touch?

Related Related

  1. 1

    how to get reference of cordova's plugins in Sencha Touch code

  2. 2

    Cordova and Sencha Touch

  3. 3

    Get container's record on "initialize" in Sencha Touch

  4. 4

    Sencha Touch: how to get config from tpl?

  5. 5

    How to get device language in sencha touch or architect

  6. 6

    Sencha Touch: how to get config from tpl?

  7. 7

    How to get device language in sencha touch or architect

  8. 8

    How to change splash screen in sencha touch cordova app

  9. 9

    Sencha touch will not build using Cordova

  10. 10

    Sencha touch will not build using Cordova

  11. 11

    Code assist - Sencha Touch

  12. 12

    how to reference itemTpl by its attribute myId in sencha touch

  13. 13

    Sencha Touch : how to reference tab bar item from controller?

  14. 14

    cordova plugin cannot be properly installed in sencha touch

  15. 15

    Sencha Touch cordova.local.properties is missing

  16. 16

    How to get Highchart Gauge to work in Sencha Touch 2

  17. 17

    How to get only gps location using sencha touch?

  18. 18

    How can I get list selected items in sencha touch 2.3.1

  19. 19

    how to get total records with a previous filter in a Sencha Touch app?

  20. 20

    How to get the DOM element for a Sencha Touch draw component

  21. 21

    How to get rid of items padding in a Sencha Touch List?

  22. 22

    Sencha Touch 2 How to get selected itemTpl in a list

  23. 23

    How to get the value of the item of list Template in sencha touch?

  24. 24

    How to get circle markerimage google map in sencha touch

  25. 25

    Sencha Touch 2: How to get (multiple) instances of a base class

  26. 26

    Get Sencha Touch Platform Name

  27. 27

    sencha touch list tpl event reference

  28. 28

    unable to get parent reference in sencha touch when calling function is in html attribute

  29. 29

    How to use Database in Sencha Touch?

HotTag

Archive