WEB开发网
开发学院手机开发Android 开发 Android Intent 用法汇总 阅读

Android Intent 用法汇总

 2010-04-13 06:16:00 来源:WEB开发网   
核心提示://寻找某个应用Uri uri = Uri.parse("market://search?q=pname:pkg_name");Intent it = new Intent(Intent.ACTION_VIEW, uri);startActivity(it);//where pkg_name is

//寻找某个应用

Uri uri = Uri.parse("market://search?q=pname:pkg_name");

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

startActivity(it);

//where pkg_name is the full package path for an application

//显示某个应用的相关信息

Uri uri = Uri.parse("market://details?id=app_id");

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

startActivity(it);

//where app_id is the application ID, find the ID

//by clicking on your application on Market home

//page, and notice the ID from the address bar

//寻找某个应用

Uri uri = Uri.parse("market://search?q=pname:pkg_name");

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

startActivity(it);

//where pkg_name is the full package path for an application

//显示某个应用的相关信息

Uri uri = Uri.parse("market://details?id=app_id");

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

startActivity(it);

//where app_id is the application ID, find the ID

//by clicking on your application on Market home

//page, and notice the ID from the address bar

Uninstall 应用程序

Java代码

Uri uri = Uri.fromParts("package", strPackageName, null);

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

startActivity(it);

上一页  1 2 3 4 5 

Tags:Android Intent 用法

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