9
votes

I'm using Cordova CLI (v6.0.0) to make an app for Android and I can't load the plugins: cordova-plugin-file and cordova-plugin-dialogs. I know it because the next alerts are shown:

if (!navigator.notification)
    alert("Plugin notification not working properly!");

if (!window.requestFileSystem)
    alert("Plugin file not working properly!");

Plugins are used after clicking a button (not before ondeviceready event). Plugins have been installed with:

cordova-plugin-file v.1.2.0

 cordova plugin add cordova-plugin-file 

cordova-plugin-dialogs v4.1.0

 cordova plugin add cordova-plugin-dialogs

I've also added the next line in config.xml

<preference name="AndroidPersistentFileLocation" value="Compatibility" />

What I'm doing wrong?

1
you should install direct git link of plugins its better.Jay Rathod RJ
But the problem persists...acimutal
Are you waiting for cordova deviceready event?? Link to docsBeat
I don't use the plugins at the beginning of the app, but when I click a button.acimutal
Any other suggestion?acimutal

1 Answers

2
votes

The next line, in the main html file, was missing:

<script type="text/javascript" src="cordova.js"></script>