On Tuesday, August 9, 2011 1:20:11 AM UTC-4, Sourav Howlader wrote:
>
> Context context = pass_some_context; 
> ActivityManager activityManager = (ActivityManager) 
> context.getSystemService(Activity.ACTIVITY_SERVICE); 
> String packageName = 
> activityManager.getRunningTasks(1).get(0).topActivity.getPackageName(); 
> String className = 
> activityManager.getRunningTasks(1).get(0).topActivity.getClassName(); 
>

This is (or at least was) not reliably accurate.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to