1

i did the following steps. But cordova plugin for android doesnt seem to work for me in force.com site

Steps followed for Cordova

1.Cordova create appname. (cd appname) 2.cordova plugin add org.apache.cordova.dialogs 3.cordova platform add android

Steps followed in salesforce side:

1.Force.com site is created. 2.platforms -> android ->assets->www-> Zipped the following contents(cordova.js,cordova-plugin.js,plugin folder). 3.Static resource has been created with the above zip file. 3.Visualforce page is created with same code as found in (http://th3silverlining.com/2015/02/07/using-native-mobile-device-features-from-visualforce-with-phonegap/)

Changed the value from index.html to the force.com site url in config.xml.

Cordova build android Cordova emulate android . Android emulator is opened with my site in app.

But the plugin doesnt seem to work. when i click the outputLink, i am getting normal js alert only in my android emulator :(

4
0

Finally i found the solution for the above question. The problem was cordova whitelist plugin did not allow my force.com site to access plugin. So finally i added the value "" in my config.xml and atlast i got a native dialog.

Thanks a lot wes for the blog and your help

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.