首页 > 编程知识 正文

安卓通讯录如何备份,安卓系统怎样备份通讯录

时间:2023-05-05 07:39:25 阅读:255671 作者:2323

public boolean restore(String path) throws Exception

{

File file = new File(path);

if (list.getLength() > 0)

{

for (int i = 0; i < list.getLength(); i++)

{

values = new ContentValues();

Element element = (Element) list.item(i);

values.put("_id", id);

values.put("address", address);

values.put("date", date);

values.put("type", type);

values.put("body", body);

resolver.insert(Uri.parse("content://sms/"), values);

}

return true;

}

else

{

return false;

}

}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。