Follow these steps to convert a WebWorks application to Cordova for use with the QNX CAR platform.
If you already have the native packaging tools (e.g. blackberry-nativepackager), you can simply download Cordova for QNX CAR from GitHub:
https://github.com/qnxcar/cordova-qnxcar
If you use any WebWorks extensions for the QNX CAR platform, you can also download the equivalent Cordova plugins from GitHub:
<script src="local:///cordova.js" type="text/javascript" charset="utf-8"></script>
document.addEventListener("webworksready", ready);
Replace that listener with the following:
document.addEventListener("deviceready", ready);
[...]
<script>
function onLoad() {
document.addEventListener("deviceready", ready);
}
</script>
</head>
<body onload="onLoad()">
[...]
blackberry.event.addEventListener("eventname", callback());
to this:
document.addEventListener("eventname", callback());
<?xml version='1.0' encoding='utf-8'?>
<widget id="sampleapp" version="1.0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets">
<name>Sample App</name>
<author>QNX Software Systems Limited</author>
<content src="index.html" />
<icon src="icon.png" />
<rim:permissions>
<rim:permit>access_shared</rim:permit>
</rim:permissions>
<access uri="http://google.com.com" subdomains="true" />
<feature name="com.qnx.car.sensors" required="true" version="1.0.0"/>
</widget>