我已经再mainfest.json里面添加了权限
"<uses-permission android:name=\"android.permission.READ_CALL_LOG\"/>",
<uses-permission android:name=\"android.permission.WRITE_CALL_LOG\"/>
但是系统运行的时候报错:
Uncaught java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.CallLogProvider from ProcessRecord{2053802 20350:io.dcloud.HBuilder/u0a198, isShadow:false} (pid=20350, uid=10198) requires android.permission.READ_CALL_LOG or android.permission.WRITE_CALL_LOG;at android.app.ContextImpl$ApplicationContentResolver.query at home.html:1
我的部分代码是:
var CallLog = plus.android.importClass("android.provider.CallLog");