当前位置: 代码迷 >> Android >> Android开发小技艺汇总
  详细解决方案

Android开发小技艺汇总

热度:1   发布时间:2016-04-28 03:04:18.0
Android开发小技巧汇总

1.Android根据包名打开应用

public void startAPP(String appPackageName){
??try{
???Intent intent = this.getPackageManager().getLaunchIntentForPackage(appPackageName);
???startActivity(intent);
??}catch(Exception e){
???Toast.makeText(this, "没有安装", Toast.LENGTH_LONG).show();
??}
?}?

?

  相关解决方案