現在の活動に到達しようとしています。以下のコードは他の例からのもので、編集後に現在のアクティビティの正しい名前が付けられています。しかし、そこから実際のインスタンスを取得するにはどうすればよいでしょうか?
ActivityManager am = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
// get the info from the currently running task
List< ActivityManager.RunningTaskInfo > taskInfo = am.getRunningTasks(1);
ComponentName componentInfo = taskInfo.get(0).topActivity;
// this is the class-name
componentInfo.getClassName();
ありがとう、マーカス