app/src/main/java/fi/finwe/orion360/sdk/pro/examples/MainMenu.java
private List<ActivityData> findOtherActivities() {

		// Create a list where to store activity data.
		List<ActivityData> activityDataList = new ArrayList<>();

		// Get all activities in the package.
		PackageInfo packageInfo = getPackageManager().getPackageArchiveInfo(
				getPackageCodePath(), PackageManager.GET_ACTIVITIES);

		// Parse each activity's name, package and full name, and store them into the list.
		for (ActivityInfo activityInfo : packageInfo.activities) {
			if (activityInfo.name.equals(this.getClass().getName()))
				continue; // Skip self.

			ActivityData activityData = new ActivityData();
			String [] nameParts = activityInfo.name.split("\\.");
			activityData.put(KEY_ACTIVITY_NAME, nameParts[nameParts.length - 1]
					.replaceAll("(\\p{Ll})(\\p{Lu})","$1 $2")); // HelloWorld -> Hello World
			activityData.put(KEY_ACTIVITY_PACKAGE, activityInfo.packageName);
			activityData.put(KEY_ACTIVITY_FULL_NAME, activityInfo.name);

			activityDataList.add(activityData);
		}

		return activityDataList;
	}
/**
	 * Find all other activities in the package, and return a list of data structures.
	 *
	 * @return A data structure for each found activity, or an empty list if none was found.
	 */
Find all other activities in the package, and return a list of data structures.
@return A data structure for each found activity, or an empty list if none was found.
Find all other activities in the package and return a list of data structures . @return A data structure for each found activity or an empty list if none was found .
private List<ActivityData> findOtherActivities() {
		List<ActivityData> activityDataList = new ArrayList<>();
		PackageInfo packageInfo = getPackageManager().getPackageArchiveInfo(
				getPackageCodePath(), PackageManager.GET_ACTIVITIES);
		for (ActivityInfo activityInfo : packageInfo.activities) {
			if (activityInfo.name.equals(this.getClass().getName()))
				continue; 
			ActivityData activityData = new ActivityData();
			String [] nameParts = activityInfo.name.split("\\.");
			activityData.put(KEY_ACTIVITY_NAME, nameParts[nameParts.length - 1]
					.replaceAll("(\\p{Ll})(\\p{Lu})","$1 $2")); 
			activityData.put(KEY_ACTIVITY_PACKAGE, activityInfo.packageName);
			activityData.put(KEY_ACTIVITY_FULL_NAME, activityInfo.name);
			activityDataList.add(activityData);
		}
		return activityDataList;
	}
private List < ActivityData > findOtherActivities ( ) { List < ActivityData > activityDataList = new ArrayList < > ( ) ; PackageInfo packageInfo = getPackageManager ( ) . getPackageArchiveInfo ( getPackageCodePath ( ) , PackageManager . GET_ACTIVITIES ) ; for ( ActivityInfo activityInfo : packageInfo . activities ) { if ( activityInfo . name . equals ( this . getClass ( ) . getName ( ) ) ) continue ; ActivityData activityData = new ActivityData ( ) ; String [ ] nameParts = activityInfo . name . split ( "\\." ) ; activityData . put ( KEY_ACTIVITY_NAME , nameParts [ nameParts . length - 1 ] . replaceAll ( "(\\p{Ll})(\\p{Lu})" , "$1 $2" ) ) ; activityData . put ( KEY_ACTIVITY_PACKAGE , activityInfo . packageName ) ; activityData . put ( KEY_ACTIVITY_FULL_NAME , activityInfo . name ) ; activityDataList . add ( activityData ) ; } return activityDataList ; }
Find all other activities in the package, and return a list of data structures.
Find all other activities in the package and return a list of data structures .
// Create a list where to store activity data. // Get all activities in the package. // Parse each activity's name, package and full name, and store them into the list. // Skip self. // HelloWorld -> Hello World