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
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
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
});
}