Commit c777e66a authored by yinjiacheng's avatar yinjiacheng

fix Demo 活体检测数据写入失败

parent 3290668b
......@@ -172,12 +172,14 @@ class AliveTestActivity : BaseActivity<ActivityAliveLayoutBinding>(), PreCallbac
fun saveFile(filename: String, data: ByteArray?) {
if (data != null) {
val sdcardPath = System.getenv("EXTERNAL_STORAGE")
dataPath = "$sdcardPath/life_circle_business/meglive"
dataPath = externalCacheDir?.absolutePath + "/alive/meglive"
val file = File(dataPath)
if (file.exists()) {
file.delete()
} else {
file.parentFile?.mkdirs()
file.createNewFile()
}
val fos = FileOutputStream(file)
fos.write(data, 0, data.size)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment