标签:ComponentName
怎么获取当前正在运行的Activity
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE); ComponentName cn = am.getRunningTasks(2).get(1).topActivity; 通过上面,可以获取到当前正在运行Activity的类名,要想获取到当前正在运行Activ……
09-27 立刻查看
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE); ComponentName cn = am.getRunningTasks(2).get(1).topActivity; 通过上面,可以获取到当前正在运行Activity的类名,要想获取到当前正在运行Activ……