public void OnCamera(XdkCameraEvent evt) { switch (evt.type) { case XdkCameraEventType.CameraPictureAdd: if (evt.success == true) { // create image HtmlImageElement largeImage = HtmlImageElement.GetById("largeImage"); //show the filename in the console console.Log(evt.filename); //save the image largeImage.src = Xdk.camera.GetPictureUrl(evt.filename); largeImage.style.width = "480px"; largeImage.style.display = "block"; } else { if (evt.message != undefined) { Alert(evt.message); } else { Alert("error taking picture"); } } break; case XdkCameraEventType.CameraPictureBusy: console.Log("busy"); break; case XdkCameraEventType.CameraPictureCancel: console.Log("canceled"); break; } }