app/src/main/java/fi/finwe/orion360/sdk/pro/examples/MainMenu.java
private void copyTestContent(boolean hasWritePermission) {
		List<FilePathPair> copyFiles = new ArrayList<>();

		// Add files to be copied to private area (does not need write permission).
		copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
				PRIVATE_INTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
				PRIVATE_INTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_PREVIEW_IMAGE_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_PREVIEW_IMAGE_FILE_MQ));

		// Add files to be copied to public area (needs write permission).
		if (hasWritePermission) {
			copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
					PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_MQ));
            copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_HQ,
                    PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_HQ));
			copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
					PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_IMAGE_FILE_MQ));
			copyFiles.add(new FilePathPair(TEST_TAG_IMAGE_FILE_HQ,
					PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_TAG_IMAGE_FILE_HQ));
		}

		// Create a progress bar to be shown while copying files.
		ProgressDialog progress = new ProgressDialog(this);
		progress.setTitle(getString(R.string.main_menu_init_title));
		progress.setMessage(getString(R.string.main_menu_init_message));
		progress.setMax(copyFiles.size());
		progress.setIndeterminate(false);
		progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);

		// Create a background task for copying the files (will take a moment).
		new CopyFileTask(progress).execute(copyFiles.toArray(
				new FilePathPair[ copyFiles.size() ]));
	}
/**
	 * Copy test content to public directories. If write permission is missing, skip some files.
	 *
	 * @param hasWritePermission Tells whether write permission has been granted, or not.
	 */
Copy test content to public directories. If write permission is missing, skip some files.
@param hasWritePermission Tells whether write permission has been granted, or not.
Copy test content to public directories . If write permission is missing skip some files . @param hasWritePermission Tells whether write permission has been granted or not .
private void copyTestContent(boolean hasWritePermission) {
		List<FilePathPair> copyFiles = new ArrayList<>();
		copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
				PRIVATE_INTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
				PRIVATE_INTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ));
		copyFiles.add(new FilePathPair(TEST_PREVIEW_IMAGE_FILE_MQ,
				PRIVATE_EXTERNAL_FILES_PATH + TEST_PREVIEW_IMAGE_FILE_MQ));
		if (hasWritePermission) {
			copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_MQ,
					PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_MQ));
            copyFiles.add(new FilePathPair(TEST_VIDEO_FILE_HQ,
                    PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_HQ));
			copyFiles.add(new FilePathPair(TEST_IMAGE_FILE_MQ,
					PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_IMAGE_FILE_MQ));
			copyFiles.add(new FilePathPair(TEST_TAG_IMAGE_FILE_HQ,
					PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_TAG_IMAGE_FILE_HQ));
		}
		ProgressDialog progress = new ProgressDialog(this);
		progress.setTitle(getString(R.string.main_menu_init_title));
		progress.setMessage(getString(R.string.main_menu_init_message));
		progress.setMax(copyFiles.size());
		progress.setIndeterminate(false);
		progress.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
		new CopyFileTask(progress).execute(copyFiles.toArray(
				new FilePathPair[ copyFiles.size() ]));
	}
private void copyTestContent ( boolean hasWritePermission ) { List < FilePathPair > copyFiles = new ArrayList < > ( ) ; copyFiles . add ( new FilePathPair ( TEST_VIDEO_FILE_MQ , PRIVATE_INTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_IMAGE_FILE_MQ , PRIVATE_INTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_VIDEO_FILE_MQ , PRIVATE_EXTERNAL_FILES_PATH + TEST_VIDEO_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_IMAGE_FILE_MQ , PRIVATE_EXTERNAL_FILES_PATH + TEST_IMAGE_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_PREVIEW_IMAGE_FILE_MQ , PRIVATE_EXTERNAL_FILES_PATH + TEST_PREVIEW_IMAGE_FILE_MQ ) ) ; if ( hasWritePermission ) { copyFiles . add ( new FilePathPair ( TEST_VIDEO_FILE_MQ , PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_VIDEO_FILE_HQ , PUBLIC_EXTERNAL_MOVIES_ORION_PATH + TEST_VIDEO_FILE_HQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_IMAGE_FILE_MQ , PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_IMAGE_FILE_MQ ) ) ; copyFiles . add ( new FilePathPair ( TEST_TAG_IMAGE_FILE_HQ , PUBLIC_EXTERNAL_PICTURES_ORION_PATH + TEST_TAG_IMAGE_FILE_HQ ) ) ; } ProgressDialog progress = new ProgressDialog ( this ) ; progress . setTitle ( getString ( R . string . main_menu_init_title ) ) ; progress . setMessage ( getString ( R . string . main_menu_init_message ) ) ; progress . setMax ( copyFiles . size ( ) ) ; progress . setIndeterminate ( false ) ; progress . setProgressStyle ( ProgressDialog . STYLE_HORIZONTAL ) ; new CopyFileTask ( progress ) . execute ( copyFiles . toArray ( new FilePathPair [ copyFiles . size ( ) ] ) ) ; }
Copy test content to public directories.
Copy test content to public directories .
// Add files to be copied to private area (does not need write permission). // Add files to be copied to public area (needs write permission). // Create a progress bar to be shown while copying files. // Create a background task for copying the files (will take a moment).