`
dawuafang
  • 浏览: 1108542 次
文章分类
社区版块
存档分类
最新评论

android pdf

 
阅读更多

Intent intent = new Intent();

//intent.addCategory("android.intent.category.DEFAULT");


intent.setAction(android.content.Intent.ACTION_VIEW);

Uri uri = Uri.fromFile(new File(param));

intent.setDataAndType(uri, "application/pdf");

//Intent intent2 = new Intent();
//intent2.setAction(Intent.ACTION_CHOOSER);
//intent2.putExtra(Intent.EXTRA_TITLE, "请选择能够打开pdf的应用");
//intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//intent2.putExtra(Intent.EXTRA_INTENT, intent);
ComponentName componetName = new ComponentName(
//这个是另外一个应用程序的包名
"com.chaozh.iReaderFree",
//这个是要启动的Activity
"com.chaozh.iReader.ui.activity.WelcomeActivity");
intent.setComponent(componetName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// startActivity(intent);

System.out.println( android.os.Build.MODEL+"," + android.os.Build.VERSION.SDK + ","+ android.os.Build.VERSION.RELEASE);

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics