Android 实现用代码安装和卸载APK
来源:互联网 发布:linux 监听端口命令 编辑:程序博客网 时间:2024/05/22 10:54
- public class TestInstallAPK extends Activity {
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- // TODO Auto-generated method stub
- super.onCreate(savedInstanceState);
- // this.unInstallFile();
- installFile();
- }
- /**
- * install APK code
- */
- private void installFile(){
- Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- intent.setAction(android.content.Intent.ACTION_VIEW);
- // String type = getMIMEType(f);
- // intent.setDataAndType(Uri.fromFile(f), type);
- intent.setDataAndType(Uri.parse("file://" + "/sdcard/Android_gc.apk"),
- "application/vnd.android.package-archive");
- this.startActivity(intent);
- }
- /**
- * uninstall APK code
- */
- private void unInstallFile(){
- Uri uri=Uri.parse("package:com.gameclient");
- Intent intent = new Intent(Intent.ACTION_DELETE,uri);
- this.startActivity(intent);
- }
- }
- Android 实现用代码安装和卸载APK
- Android代码实现APK的下载安装和卸载<1>
- Android代码实现APK的下载安装和卸载<2>
- android代码安装和卸载apk
- android 代码安装和卸载apk
- Android实现安装和卸载APK
- 代码实现安装卸载apk
- Android代码实现APK文件的安装与卸载
- ANDROID代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- ANDROID代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- Android代码实现APK文件的安装与卸载
- ANDROID代码实现APK文件的安装与卸载
- ANDROID代码实现APK文件的安装与卸载
- 网页消重算法(via北大天网课题组)
- QT QStringList 用法 .
- 图片上传预览(支持ie,firefox)
- 面向对过程与面向对象
- 存储过程能力
- Android 实现用代码安装和卸载APK
- mysql and sqlalchemy
- JTable中右键选中行并弹出菜单
- HTML5:Subway Map Visualization jQuery Plugin(示例畫深圳地鐵線路圖)
- javascript页面特殊符号处理过滤
- IOS 多线程 NSThread
- HTML5:Subway Map Visualization jQuery Plugin(示例畫深圳地鐵線路圖)
- 客户端获取数据方法
- redhat 和 centos