1

Add a camera feature to an app in which users who use the app can use the camera feature to upload an image onto the app using Smartface?

I've tried implementing a camera feature but it didn't go well.

Thankyou

S.Laura
  • 13
  • 5

1 Answers1

0

You can add camera feature to the app using below codes:

var btn = new SMF.UI.TextButton({
     top : "70%",
     text : "Camera",
     onPressed : Page1_TextButton1_OnPressed
});
Pages.Page1.add(btn);
         function Page1_TextButton1_OnPressed(e) {
            SMF.Multimedia.startCamera({
                cameraType : 1, //rear camera
                resolution : 2, //large resolution
                autoFocus : true,
                onStart : function () {}, //do nothing
                onCapture : function (e) {
                    alert("path=" + e.photoUri);
                },
                onCancel : function () {}, //do nothing
                onFailure : function () {}
                //do nothing
            });
        }
Ed Glazer
  • 121
  • 3