WEB开发网
开发学院手机开发Android 开发 Android Intent调用系统实例分析 阅读

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);

上一页  1 2 3 4 

Tags:Android Intent 调用

编辑录入:coldstar [复制链接] [打 印]
赞助商链接