MSDK5自定义拍照使用KeyCustomExpandFileNameSettings照片重命名失败
已完成创建文件夹是成功的,但是在按下拍照按钮时(执行demo中的拍照之前,也就是demo中actionOnShootingPhoto方法之前)使用KeyCustomExpandFileNameSettings去修改照片文件名称,就会失败,sd卡里面照片没有修改成功,报错信息
ErrorImp{errorType='CORE', errorCode='INVALID_PARAM', innerCode='CAMERA.CustomExpandFileNameSettings:-6', description='null', hint='error code = -6'}
具体代码如下
val customExpandNameSettings = CustomExpandNameSettings()
customExpandNameSettings.customContent = "oooo$taskId"
customExpandNameSettings.encodingType = EnCodingType.UTF8
customExpandNameSettings.forceCreateFolder = true
customExpandNameSettings.relativePosition = RelativePosition.POSITION_END
customExpandNameSettings.priority = 0
val fileNameKey = KeyTools.createKey(CameraKey.KeyCustomExpandFileNameSettings)
KeyManager.getInstance().setValue(fileNameKey,customExpandNameSettings,object : CommonCallbacks.CompletionCallback{
override fun onSuccess() {
logx("创建自定义照片成功!")
}
override fun onFailure(p0: IDJIError) {
logx("创建自定义照片失败:${p0}")
}
})
请先登录再写评论。
评论
5 条评论