This is a migrated thread and some comments may be shown as answers.

Creating a contact results in javascript error

1 Answer 14 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alexander
Top achievements
Rank 1
Alexander asked on 24 Jun 2012, 04:42 PM
Hi guys,

I have the following problem. I created a "Cross-platform Device Application (Kendo UI Mobile)" using Icenium Mist. Without changing anything I add the following code in hello-world.js:

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
    var contact = navigator.contacts.create({"displayName" : "Contact1"});
    contact.save();
}

When I run it into the simulator (no matter Android or iOS) I'm getting an error in cordova.js on line 962. The error occurs because Math.uuid method is undefined.

Is this a known  issue or I should perform some additional steps?

Thanks
Ivan

1 Answer, 1 is accepted

Sort by
0
Nikolay
Top achievements
Rank 1
answered on 25 Jun 2012, 03:16 PM
Thanks for your report and for trying out Icenium.

The reason for the error is that currently Contacts are not simulated/mocked in the simulator-version of Cordova.js. The same error is observable in the debugger view in Simulator of Icenium Graphite.

We currently are in the process of building UI (where necessary) for simulating the available through Cordova's API sensors and device internals (such as the Contacts).

The issue is logged and scheduled for fixing.


Regards,
Nikolay Tsenkov
Tags
Report a bug
Asked by
Alexander
Top achievements
Rank 1
Answers by
Nikolay
Top achievements
Rank 1
Share this question
or