新建uri.mjava文件,代码见Android代码URI转PATH,复制代码时把最外层删掉,即
public class FileUriUtils{
}
//iyu
javanew(intent,"android.content.Intent","String","android.intent.action.GET_CONTENT")
java(setType,intent,"android.content.Intent.setType","String","image/*")
java(null,activity,"android.app.Activity.startActivityForResult","android.content.Intent",intent,"int",2)
//回调结果事件
javags(resultCode,activity,"android.app.Activity","RESULT_OK")
f(st_sC==2)
{
f(st_lC==resultCode)
{
java(uri,st_iT,"android.content.Intent.getData")
call(path, "mjava", "uri.getByUri", activity, uri)
}
}
摘自网络,稍作修改。
网友评论