您现在的位置是:网站首页> 软件下载软件下载
逸雨清风 安卓资料导出备份下载v1.0 手机版-软件下载
                     2021-05-06
                196人已围观
                
                2021-05-06
                196人已围观
            
简介 逸雨清风 安卓资料导出备份下载v1.0 手机版-软件下载
该软件支持导入导出手机通讯录与短信,可以通过导出进行备份,还可以直接阅读导出信息。导出文件存储在手机和SD卡里双重保险。
下一版本设计:
1、添加备忘录导入导出
2、优化导入导出时间
3、添加更多导出选项
4、支持网络化传送导出文件,互相导入


部分代码分享:
导出通讯录
[java] view plaincopy
public void GetTongXun() throws IOException 
 { 
 ContentResolver resolver = this.getContentResolver(); 
 Uri uri = Uri.parse("content://com.android.contacts/contacts"); 
 Cursor cursor = resolver.query(uri, new String[]{Data._ID}, null, null, null); 
 File file = CreatFile(dir+"通讯录.txt"); 
 FileOutputStream outputStream = new FileOutputStream(file); 
 FileOutputStream fos = null; 
 fos = openFileOutput("通讯录.txt",Context.MODE_WORLD_READABLE + Context.MODE_WORLD_WRITEABLE); 
 while(cursor.moveToNext()) 
 { 
 StringBuilder buf = new StringBuilder(); 
 int id = cursor.getInt(0);//获得id并且在data中寻找数据 
 uri = Uri.parse("content://com.android.contacts/contacts/"+id+"/data"); //如果要获得data表中某个id对应的数据,则URI为content://com.android.contacts/contacts/#/data 
 Cursor cursor2 = resolver.query(uri, new String[]{Data.DATA1,Data.MIMETYPE,Data.DATA10}, null,null, null); //data1存储各个记录的总数据,mimetype存放记录的类型,如电话、email等 
 String phone = null; 
 while(cursor2.moveToNext()) 
 { 
 String data = cursor2.getString(cursor2.getColumnIndex("data1")); 
 if(cursor2.getString(cursor2.getColumnIndex("mimetype")).equals("vnd.android.cursor.item/name") && cursor2.getString(cursor2.getColumnIndex("data10")).equals("2") ){ //如果是名字 
 buf.append(data); 
 if (phone != null) buf.append(phone); 
 } 
 else if(cursor2.getString(cursor2.getColumnIndex("mimetype")).equals("vnd.android.cursor.item/phone_v2")){//如果是电话 
 phone = new String(" "+data+"\n"); 
 } 
 } 
 String str = buf.toString(); 
 try { 
 outputStream.write(str.getBytes()); 
 fos.write(str.getBytes()); 
 } catch (IOException ex) {} 
 } 
 try { 
 outputStream.close(); 
 fos.close(); 
 } catch (IOException ex) {} 
 new AlertDialog.Builder(this).setMessage("成功导出通讯录!").show(); 
 } 
导出短信
[java] view plaincopy
public void OutDuanxin() throws IOException 
 { 
 Uri uri = Uri.parse("content://sms/"); 
 smsContent sc = new smsContent(this,uri); 
 List
 List
 File file = CreatFile(dir+"短信.txt"); 
 FileOutputStream outputStream = new FileOutputStream(file); 
 FileOutputStream fos = null; 
 fos = openFileOutput("短信.txt",Context.MODE_WORLD_READABLE + Context.MODE_WORLD_WRITEABLE); 
 File realfileFile = CreatFile(dir+"duanxin.yyqf"); 
 FileOutputStream realoutputStream = new FileOutputStream(realfileFile); 
 FileOutputStream realfos = null; 
 realfos = openFileOutput("duanxin.yyqf",Context.MODE_WORLD_READABLE + Context.MODE_WORLD_WRITEABLE); 
 String string = new String(); 
 String realString = new String(); 
 for (int i=0;i
 string+=infos.get(i).getName(); 
 string+="\n号码:"+infos.get(i).getPhoneNumber(); 
 string+="\n日期:"+infos.get(i).getDate(); 
 string+="\n消息:"+infos.get(i).getSmsbody(); 
 string+="\n====================================\n"; 
 realString+=realinfos.get(i).getPhoneNumber()+"\n"; 
 realString+=realinfos.get(i).getSmsbody()+"\n"; 
 realString+= ".!@#$%^&*().[].yyqf\n" + realinfos.get(i).getDate()+"\n"; 
 realString+=realinfos.get(i).getType()+"\n"; 
 } 
 try { 
 fos.write(string.getBytes()); 
 outputStream.write(string.getBytes()); 
 realfos.write(realString.getBytes()); 
 realoutputStream.write(realString.getBytes()); 
 } catch (Exception e) {} 
 try { 
 outputStream.close(); 
 fos.close(); 
 realfos.close(); 
 realoutputStream.close(); 
 } catch (IOException ex) {} 
 new AlertDialog.Builder(this).setIcon(android.R.drawable.ic_dialog_info).setMessage("成功导出短信!").show(); 
 } 
相关内容
- Swapper2汉化版下载0.2.8r2-软件下载
- Jiffy时间管理-时间管理(Jiffy
- 安卓手机新华字典下载v5.2.6 去广告正式版-android离线电子字典软件下载
- AutoTouch 破解版-AutoTouch 安卓版下载1.5.5 已付费版-软件下载
- 神雕侠侣烧饼辅助下载1.0 安卓版-神雕侠侣ol手游烧饼辅助软件下载
- 迅雷手机助手下载-迅雷手机助手安卓版下载1.11 官方版-软件下载
- 南都网安卓客户端下载2.1 官方版-软件下载
- 易达出租车-易达打车下载3.1 安卓版-软件下载
- 二次元狂热手机客户端下载v2.0.0 安卓版-软件下载
- 压缩大师汉化版下载4.6.7 专业版-压缩大师中文版软件下载
点击排行
- ifile下载 IOS资源管理器(iFile) v2.0.1-1 最新版 下载-
- IOS7控制中心启动增强插件 (Polus) v2.0.2-1 deb格式 下载-
- 7Folder Relayout(IOS7系统高级springboard设置增强插件) v0.1-4 deb格式 下载-
- IOS7屏保插件(Daydreaming ScreenSaver) V1.0-1 deb格式 下载-
- Cloaky(IOS系统功能开关显示自定义插件) v1.8-1 deb格式汉化版 下载-
- 短信回复插件下载 Auki快捷回复短信插件 v1.3 免费版 支持iOS7.1.x越狱 下载-
- IOS7快速选择WIFI插件(Vestigov) v0.2.2-1 deb格式 下载-
- IOS7键盘颜色自定义增强插件(DathKeys) v1.0.3 deb格式 下载-
本栏推荐
- 
                        
                                                            
                                      ifile下载 IOS资源管理器(iFile) v2.0.1-1 最新版 下载- 
- 
                        
                                                            
                                      IOS7控制中心启动增强插件 (Polus) v2.0.2-1 deb格式 下载- 
- 
                        
                                                            
                                      7Folder Relayout(IOS7系统高级springboard设置增强插件) v0.1-4 deb格式 下载- 
- 
                        
                                                            
                                      IOS7屏保插件(Daydreaming ScreenSaver) V1.0-1 deb格式 下载- 
- 
                        
                                                            
                                      Cloaky(IOS系统功能开关显示自定义插件) v1.8-1 deb格式汉化版 下载- 
- 
                        
                                                            
                                      短信回复插件下载 Auki快捷回复短信插件 v1.3 免费版 支持iOS7.1.x越狱 下载- 
- 
                        
                                                            
                                      IOS7快速选择WIFI插件(Vestigov) v0.2.2-1 deb格式 下载- 
猜你喜欢
- ifile下载 IOS资源管理器(iFile) v2.0.1-1 最新版 下载-
- IOS7控制中心启动增强插件 (Polus) v2.0.2-1 deb格式 下载-
- 7Folder Relayout(IOS7系统高级springboard设置增强插件) v0.1-4 deb格式 下载-
- IOS7屏保插件(Daydreaming ScreenSaver) V1.0-1 deb格式 下载-
- Cloaky(IOS系统功能开关显示自定义插件) v1.8-1 deb格式汉化版 下载-
- 短信回复插件下载 Auki快捷回复短信插件 v1.3 免费版 支持iOS7.1.x越狱 下载-
- IOS7快速选择WIFI插件(Vestigov) v0.2.2-1 deb格式 下载-
 
                                
                                                         
                                
                                                         
                                
                                                         
                                
                                                         
                                
                                                         
                                
                                                         
                                
                                                         
 
    