如何用代码实现卸载已经安装的应用程序。请各位赐教!

解决方案 »

  1.   

    安装和卸载Android应用程序(apk包) 
    B、软件卸载代码实现,注意这里Action是Intent.ACTION_DELETE 
    //通过程序的报名创建URI 
    Uri packageURI = Uri.parse("package: poet.android.app.id"); 
    //创建Intent意图 
    Intent intent = new Intent(Intent.ACTION_DELETE); 
    //执行卸载程序 
    startActivity(intent);
    这个,楼主试过了吗?
      

  2.   

    Uri packageURI = Uri.parse("package: poet.android.app.id"); 
     有什么用吗?
      

  3.   

    这个是你要卸载的app的具体包路径
      

  4.   


    Uri packageURI = Uri.parse("package:com.sina.weibo"); 
    //创建Intent意图 
    Intent intent = new Intent(Intent.ACTION_DELETE); 
    //执行卸载程序 
    startActivity(intent);这样写报错啊!