Hi,
I'm trying to get the foreground task using below code.
It looks like its not working on Atrix 2.3.4. I dont have Atrix to try onCode:ActivityManager activityManager = (ActivityManager) getSystemService(UpdateService.ACTIVITY_SERVICE); List<ActivityManager.RunningTaskInfo> appProcesses = activityManager.getRunningTasks(1); Log.i("MyApp", "Foreground Package: " + appProcesses.get(0).topActivity.getPackageName());
Any ideas?

LinkBack URL
About LinkBacks
Reply With Quote