Creating a contact results in javascript error

2 posts, 0 answers
  1. Alexander
    Alexander avatar
    1 posts
    Member since:
    Dec 2011

    Posted 24 Jun 2012 Link to this post

    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
  2. Nikolay
    Nikolay avatar
    4 posts
    Member since:
    Apr 2010

    Posted 25 Jun 2012 Link to this post

    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
Back to Top