public Activity getMostRecentlyStartedActivity() {
        List<StartedActivity> activities = getStartedActivities();

        if (activities.size() == 0) {
            return null;
        }

        return activities.get(activities.size() - 1).getActivity();
    }
public Activity getMostRecentlyStartedActivity() {
        List<StartedActivity> activities = getStartedActivities();

        if (activities.size() == 0) {
            return null;
        }

        return activities.get(activities.size() - 1).getActivity();
    }
public Activity getMostRecentlyStartedActivity ( ) { List < StartedActivity > activities = getStartedActivities ( ) ; if ( activities . size ( ) == 0 ) { return null ; } return activities . get ( activities . size ( ) - 1 ) . getActivity ( ) ; }
Returns the most recently started {@link Activity}. In most cases, this
will be the activity currently visible on screen.
Returns the most recently started {