android 打开第三方应用 跳转
2013-02-26 14:06
447 查看
引用:/article/2305773.html
方法一:
Intent intent = new Intent();
intent.setClassName(<package name>, <class name>);
startActivity(intent);
方法二:
Intent i=new Intent;
ComponentName com= new ComponentName(<Package Name> , <Calss Name>);
i.setComponent(com);
startActivity(i);
//启动媒体库
Intent i = new Intent();
ComponentName comp = new ComponentName("com.android.camera","com.android.camera.GalleryPicker");
i.setComponent(comp);
i.setAction("android.intent.action.VIEW");
startActivity(i);
//启动相机
Intent mIntent = new Intent();
ComponentName comp = new ComponentName("com.android.camera","com.android.camera.Camera");
mIntent.setComponent(comp);
mIntent.setAction("android.intent.action.VIEW");
startActivity(mIntent);
//启动htmlviewer,并打开指定的一个文件 注意TXT不能是ANSI的,否则会乱码
Intent intent = new Intent();
ComponentName cn = new ComponentName("com.android.htmlviewer", "com.android.htmlviewer.HTMLViewerActivity");
intent.setComponent(cn);
Uri uri = Uri.fromFile(new File("/sdcard/demo.txt"));
intent.setDataAndType(uri, "text/plain");
startActivity(intent)
方法一:
Intent intent = new Intent();
intent.setClassName(<package name>, <class name>);
startActivity(intent);
方法二:
Intent i=new Intent;
ComponentName com= new ComponentName(<Package Name> , <Calss Name>);
i.setComponent(com);
startActivity(i);
//启动媒体库
Intent i = new Intent();
ComponentName comp = new ComponentName("com.android.camera","com.android.camera.GalleryPicker");
i.setComponent(comp);
i.setAction("android.intent.action.VIEW");
startActivity(i);
//启动相机
Intent mIntent = new Intent();
ComponentName comp = new ComponentName("com.android.camera","com.android.camera.Camera");
mIntent.setComponent(comp);
mIntent.setAction("android.intent.action.VIEW");
startActivity(mIntent);
//启动htmlviewer,并打开指定的一个文件 注意TXT不能是ANSI的,否则会乱码
Intent intent = new Intent();
ComponentName cn = new ComponentName("com.android.htmlviewer", "com.android.htmlviewer.HTMLViewerActivity");
intent.setComponent(cn);
Uri uri = Uri.fromFile(new File("/sdcard/demo.txt"));
intent.setDataAndType(uri, "text/plain");
startActivity(intent)
相关文章推荐
- Android 第三方应用的打开
- android第三方应用跳转到QQ并指定QQ号聊天
- android 跳转Intent (第三方应用) & 去掉标题栏 &可见性&透明背景
- Android开发中使用Intent打开第三方应用及验证可用性的方法详解
- Android Intent跳转第三方地图应用,传入地址
- Android 系统第三方应用系统修改权限及在应用上层显示权限默认打开
- Android 第三方应用跳转到qq进行聊天(qq咨询)
- Android中WebView,打开第三方应用的问题
- Android 打开本地第三方应用,如QQ,微博,微信等
- android读取word文档的方法:一,第三方应用打开
- android第三方应用跳转到QQ并指定QQ号聊天
- Android 打开本地第三方应用,如QQ,微博,微信等。
- Android点击通知栏,打开应用跳转到相应的Activity
- Android开发之如何在WebView中点击链接使用自身打开(解决出现的选择使用第三方应用的问题)
- Android判断当前应用通知是否 4000 打开,跳转到打开通知界面
- 【Android】打开第三方App以及系统应用服务
- android intent 跳转到第三方应用 如果第三方应用已经启动,但是隐藏在home下,如何让它显示出来?
- Android端 通过第三方应用打开文档的方式
- android 打开第三方应用的几种方式
- Android第三方应用或者原生app内跳转React native的某个页面