【发布时间】:2019-10-18 07:34:35
【问题描述】:
我正在尝试在屏幕下方显示从相机加插件拍摄的图像。
为此,我正在尝试名为“照片捕获事件”的事件,并意识到事件本身并未被触发。我只是在里面放了一条警告消息,并确认它不起作用。下面是示例 sn-p,有关完整解决方法,请转到此链接 https://play.nativescript.org/?template=play-js&id=nvIlTl&v=3
CameraPlus.on(nativescript_camera_plus.CameraPlus.photoCapturedEvent, args => {
fromAsset(args.data).then(result => {
pic.src = result;
alert(result);
});
});
<GridLayout rows="*,auto" class="home-panel">
<Cam:CameraPlus row="0" id="camPlus" saveToGallery="true"
showCaptureIcon="true" showGalleryIcon="true" showToggleIcon="true"
showFlashIcon="true" debug="true">
</Cam:CameraPlus>
<Image row="1" height="150" id="img_taken_id" src="{{ img_taken }}" />
</GridLayout>
首先,我需要知道为什么没有收到警报消息? 其次,我需要显示不存储在本地的图像?
重要提示:我正在为“android”而不是 IOS 尝试这个
【问题讨论】:
-
你尝试过github示例吗?
-
@vikas 是的,样本在本地运行良好。如果我单独只写我需要的事件。 “照片捕获事件”不起作用。
标签: nativescript nativescript-plugin