如何编辑其他应用程序的进程/活动?

时间:2014-01-22 11:29:56

标签: android android-layout android-activity android-service

有了这个,我可以看到打开的应用程序(显示包名和类名):

Context context = this.getApplicationContext();
    ActivityManager mgr = (ActivityManager)context.getSystemService(ACTIVITY_SERVICE);

    ConfigurationInfo config = mgr.getDeviceConfigurationInfo();
    List<RunningAppProcessInfo> processes = mgr.getRunningAppProcesses();
    List<RunningTaskInfo> tasks = mgr.getRunningTasks(100);

    String runningTasks = "Running tasks: \n";

    for(Iterator i = tasks.iterator(); i.hasNext();){
        RunningTaskInfo p = (RunningTaskInfo)i.next();
        runningTasks += p.id + " " + p.baseActivity.flattenToString() + "\n";
    }

    System.out.println(runningTasks);

我如何访问和编辑特定流程?

例如,访问com.whatsapp / Conversation并更改背景颜色。 是否可以从另一个未链接的应用程序更改应用程序“X”的界面?

0 个答案:

没有答案