首页 > 学院 > 开发设计 > 正文

安装和卸载程序

2019-11-06 09:47:24
字体:
来源:转载
供稿:网友

  Intent intent = new Intent(Intent.ACTION_VIEW);  intent.setDataAndType(Uri.fromFile(new File("/sdcard/Test.apk")),    "application/vnd.android.package-archive");  startActivity(intent); // 安装 程序

  Uri packageURI = Uri.parse("package:com.ygc.Test");  Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);  startActivity(uninstallIntent);// 正常卸载程序


上一篇:开机启动

下一篇:OC:对象、类、元类

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表