Cordova features are not working

I created a new tizen wearable project using Basic template.

Here is my config.xml. Note the requried_version="5.5" (which is higher than 3.0 as stated in the docs) and privilege (as docs state that it is also requried for accessing cordova features).

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="" xmlns:tizen="" id="http://yourdomain/BasicUI" version="1.0.0" viewmodes="maximized">
    <tizen:application id="YvmUHXsqCI.BasicUI" package="YvmUHXsqCI" required_version="5.5"/>
    <content src="index.html"/>
    <feature name=""/>
    <icon src="icon.png"/>
    <tizen:privilege name=""/>
    <tizen:profile name="wearable"/>
    <tizen:setting background-support="disable" encryption="disable" hwkey-event="enable"/>

Here is my main.js

window.onload = function () {
    document.addEventListener('deviceready', onDeviceReady, false);

	function onDeviceReady() {
	    console.log('Cordova features now available');
	    console.log('Cordova version: ' + device.cordova);
	    console.log('Model name: ' + device.model);
	    console.log('Platform: ' + device.platform);
	    console.log('OS version: ' + device.version);
	    console.log('Device UUID: ' + device.uuid);

    // add eventListener for tizenhwkey
    document.addEventListener('tizenhwkey', function(e) {
        if(e.keyName == "back")
	try {
	} catch (ignore) {

    // Sample code
    var textbox = document.querySelector('.contents');
    textbox.addEventListener("click", function(){
    	box = document.querySelector('#textbox');
    	box.innerHTML = box.innerHTML == "Basic" ? "Sample" : "Basic";

The issue is that deviceready event is not called. window.device also does not become available.

Is it possible to query cordova device info?


1 Replies
Francisc Ungureanu

Hi @Egor, have you found any solutions to this issue ?