手机
当前位置:查字典教程网 >编程开发 >安卓软件开发 >android打开rar压缩文件
android打开rar压缩文件
摘要:复制代码代码如下:privatevoidopen(StringfileString){Intentintent=newIntent();in...

复制代码 代码如下:

private void open(String fileString) {

Intent intent = new Intent();

intent.setClassName("com.rarlab.rar", "com.rarlab.rar.MainActivity");

File file = new File(fileString);

Uri data = Uri.fromFile(file);

intent.setData(data);

try {

startActivity(intent);

} catch (ActivityNotFoundException e) {

try {

Uri uri = Uri.parse("market://search?q=" + "rar");

Intent it = new Intent(Intent.ACTION_VIEW, uri);

startActivity(it);

} catch (ActivityNotFoundException e2) {

Log.i(TAG, "market no found");

}

}

}

【android打开rar压缩文件】相关文章:

android开发基础教程—三种方式实现xml文件解析

Android 判断网络状态

android 9PNG图片制作过程(图文介绍)

Android开源组件小结

Android开发之SQLite的使用方法

android 权限大全 分享

android 比较靠谱的图片压缩

Android 有道词典的简单实现方法介绍

android项目打包jar

android开发基础教程—文件存储功能实现

精品推荐
分类导航