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

[Solved] navigator.camera.getPicture not working

3 Answers 232 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Andrew
Top achievements
Rank 1
Andrew asked on 14 Dec 2012, 05:59 PM
 I try to use the getPicture function but I suspect it needs some permission because the alert in the callback function works but navigator.camera.getPicture(...) does nothing. Below I put the code:

          function takePhoto() {
                navigator.notification.alert("Camera", null, "Photo", "Confirm");
            navigator.camera.getPicture(onCameraSuccess, onCameraError);
                navigator.notification.alert("photo");
           
            }
            
            function onCameraSuccess(imageURL) {
            navigator.notification.alert("onCameraSuccess: " +
            imageURL);
            }
            
            function onCameraError(e) {
                navigator.notification.alert("onCameraError: " + e);
            }

3 Answers, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 15 Dec 2012, 08:26 AM
Hi Andrew,

Can you share more about your scenario? What kind of mobile phone are you testing this on? You should also note that this API is not supported in the simulator.

You can also clone our camera example from GitHub here. We have tested this on various devices and it is working flawlessly.

Regards,
Stefan Dobrev
the Icenium team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
0
Andrew
Top achievements
Rank 1
answered on 15 Dec 2012, 11:49 AM
On my iPod touch it was not working until I added the destionationType parameter.  That pretty solved my problem.

One extra: With Icenium, Kendo mobile is free? Should I pay the same license fees as if I were using it personally?
0
Stefan Dobrev
Telerik team
answered on 17 Dec 2012, 09:44 AM
Hi Andrew,

We are glad that you that you were able to make the camera code working.

Regarding your question about Kendo Mobile the answer is: Kendo Mobile is included in Icenium and you do not have to pay extra for it. However you should note that the license that Kendo Mobile is redistributed in Icenium is a special one and requires only apps built in Icenium to use it. More info can be found in the EULA document here.

Kind regards,
Stefan Dobrev
the Icenium team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
General Discussion
Asked by
Andrew
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or