private static String createStartActivityCommand(String activityName) { String fullActivityName = Constants.TARGET_PACKAGE.concat("/").concat(activityName); String startActivityCommand = adbFullPath_ .concat(" ") .concat(Constants.START_ACTIVITY_CMD) .concat(" ") .concat(fullActivityName); System.out.println("START" + startActivityCommand); return startActivityCommand; }
/** Returns activity name without package (like .activities.MainActivity) */ private static String getActivityNameWithoutPackage(String fullActivityName) { int packageLength = Constants.TARGET_PACKAGE.length(); String clearName = fullActivityName.substring(packageLength); return clearName; }