我正在使用此缺少什麼權限?
public void smsbackup() throws IOException
{
InputStream in = new FileInputStream("/data/data/com.android.providers.telephony/databases/mmssms.db");
File dir = new File("/mnt/sdcard/bcfile");
dir.mkdirs();
OutputStream output = new FileOutputStream("/data/data/com.android.app/files/");
byte[] buffer = new byte[1024];
int length;
while ((length = in.read(buffer))>0)
{
output.write(buffer, 0, length);
}
output.flush();
output.close();
in.close();
}
它拋出像permission denied
例外,我不知道會我給什麼權限短信備份。有人告訴我?提前致謝。
大聲笑!您正在使用的權限是什麼? –
您應該查看您的例外日誌,它會顯示您缺少的權限。 – Egor
同樣在未來,它是真正有幫助的,如果你從LogCat發佈Stacktrace – slayton