开机启动apk

\\192.168.1.113\jd_work2_rk3188_sdk\cprk3188_android5.1_pad_m310\frameworks\base\services\core\java\com\android\server\am\ActivityManagerService.java

startHomeActivityLocked

 

 

 

修改代码位置:

0, null, null,

android.Manifest.permission.RECEIVE_BOOT_COMPLETED,

AppOpsManager.OP_NONE, true, false, MY_PID, Process.SYSTEM_UID,

userId);

}

}

scheduleStartProfilesLocked();

}

}

//完全开机后启动app by:shihao

startAppOrService(mContext,"com.running.adbmill.adbmill");

}

/**

* start 新增启动第三方应用的方法 by:shihao

*/

private void startAppOrService(Context context,String appPackage) {

PackageManager doupackageManager = context.getPackageManager();

Intent intent = new Intent();

try{

intent = doupackageManager.getLaunchIntentForPackage(appPackage);

if(intent!=null){

context.startActivity(intent);

}

}catch(Exception e){

Log.i(TAG,"startApp_exception");

}

}

/**

* end by:shihao

*/

更多相关文章

  1. Android中启动第三方程序的代码
  2. Android之Uri转化为Bitmap,一行代码
  3. Android Studio 打Jar包和混淆代码。
  4. Android 指定Toast信息显示的位置并使用Toast显示其他View
  5. Android 代码模拟输入按键
  6. Android 获取手势onfling代码片段

随机推荐

  1. Android 使用AsyncTask更新UI
  2. Android常见的几种RuntimeException
  3. Android新手入门进阶之路
  4. 解决 android-apt plugin is incompatibl
  5. 设备方向
  6. android sdk安装后出现location of the a
  7. 导入android工程@Override报错
  8. Android 快速开发开源框架
  9. Android隐藏/移除ActionBar
  10. Android Binder源码阅读