V
V
vostotskiy2016-03-01 13:10:29
Android
vostotskiy, 2016-03-01 13:10:29

Why doesn't cordova see plugins and deviceready?

Hello. I created an application via CLI (cordova create), downloaded a plugin for the calendar, when I try to call, the deviceready event jumps. Without wrapper, deviceready() writes that window.plugin.calendar is not defined.
I also noticed that the cordova.js file, in which this event is processed and registered, is not present in the base project. Couldn't figure it out from the documentation. I downloaded the cordova.js file separately along with cordova.plugins. The event began to be processed, but does not see plugins. It is not entirely clear why deviceready is not processed in the basic version of the application and there is no access to plug-ins connected using cli. In theory, they themselves should be added to the base xml settings, as well as register and be available through window.plugin.[plugin_name].
Tell me, please, how without perversions, what did I do (separately downloaded and linked to index.html cordova.js to the supplied framework) to add deviceready processing?
ps. I tried both on the emulator (generated apk and ran it in GenyMotion), and in the browser, tried different versions of plugins (at least 3 sources).
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question