I am now using WebWorks to make a hosted web app, i.e. an app that open my website url. I also want to include some native Blackberry API functions (e.g. Toast) to the app.
Everything was working fine. I include my URL (for example, http://www.example.com/index) in the "Main URL" field. And on my site, I have added the line
So it can load the cordova.js and use the blackberry functions.
But if I change my "Main URL" to https like https://www.example.com/index, the cordova.js can't be loaded anymore. On the web inspector console, it says
[blocked] The page at https://www.example.com ran insecure content from local:///cordova.js.
I have tried to add local:/// to the whitelist, and turn the "Enable Web Security" off, but to no avail.
Please advice what I can do. Thank you very much!
This is the first post of mine (also new to BB dev) so suggest if anything is not correct and accept my sincere appologies. I am giving you step by step I hope you don't get offended as others who are new to BB dev see this as helpful for them.
Step 0: Start the "BlackBerry 10 Simulator".
Step 1: Start the "BlackBerry WebWorks 2.2.0.15"
Step 2: Opens the browser with localhost:3123/
Step 3: Create a sample project by giving Create Project PROJECT ID PROJECT NAME PROJECT PATH
Step 4: This would create a project with index.html file
Step 5: Click on plugins tab on the browser with localhost:3123 and add "com.blackberry.invoke"
Step 6: Replace the body section of code of index.html with the code mentioned below:-
Step 7: Click on build tab on the browser
Choose Build Mode : DEBUG MODE and Target Type : SIMULATOR
Step 8: Click on build and install. Once ready opens the app on the simulator and prompts with OK button click on it.
Step 9: Again click on "Click me to test Opening https" it opens a browser with secure url
Step 10: If this works for you might give you a hint on how you want to proceed.