/** *启动安装APK * @author YOLANDA * @param path * @return */    public static void installApkByPath(Context context, String path){        Intent intent = new Intent(Intent.ACTION_VIEW);        intent.setDataAndType(Uri.fromFile(new File(path)), Constants.INSTALL_MIMETYPE);        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);        context.startActivity(intent);    }    /** * 启动卸载 * @author YOLANDA * @param context * @param oldpackage */    public static void uninstallApkByPackage(Context context, String oldpackage){        try {            Uri packageURI = Uri.parse("package:" + oldpackage);            Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);            context.startActivity(uninstallIntent);        } catch (Exception e) {        }    }

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. AlertDialog背景的修改
  2. Android获取屏幕宽高、屏幕密度、手动计
  3. 如何学Android
  4. Android 中 Log 机制详解
  5. Android(安卓)系统(239)---Android(安卓)PM
  6. android market开发者注册上传app应用教
  7. Android不支持web页滚动
  8. Android开机启动
  9. Android 将View 转化为bitmap 图片
  10. android textview 自动链接网址 修改默认