Android Intent调用系统实例分析
2010-09-10 00:34:00 来源:WEB开发网核心提示:startActivity(Intent.createChooser(it, "Choose Email Client"));10.播放多媒体Intent it = new Intent(Intent.ACTION_VIEW);Uri uri = Uri.parse("file:///sd
startActivity(Intent.createChooser(it, "Choose Email Client"));
10.播放多媒体
Intent it = new Intent(Intent.ACTION_VIEW);
Uri uri = Uri.parse("file:///sdcard/song.mp3");
it.setDataAndType(uri, "audio/mp3");
startActivity(it);
Uri uri = Uri.withAppendedPath(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, "1");
Intent it = new Intent(Intent.ACTION_VIEW, uri);
startActivity(it);
11.卸载 apk
Uri uri = Uri.fromParts("package", strPackageName, null);
Intent it = new Intent(Intent.ACTION_DELETE, uri);
startActivity(it);
12.install apk
Uri installUri = Uri.fromParts("package", "xxx", null);
returnIt = new Intent(Intent.ACTION_PACKAGE_ADDED, installUri);
[]
更多精彩
赞助商链接