android how to get current activity

130

android how to get current activity -

ActivityManager am = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE);
ComponentName cn = am.getRunningTasks(1).get(0).topActivity;

Comments

Submit
0 Comments