- // Instantiate the download location helper.
- val downloadLocationHelper = DownloadLocationHelper()
-
- // Get the default file path.
- val defaultFilePath = downloadLocationHelper.getDownloadLocation(context) + "/" + fileName
-
- // Display the default file path.
- fileNameEditText.setText(defaultFilePath)
-
- // Hide the storage permission text view if the permission has already been granted.
- if (ContextCompat.checkSelfPermission(requireContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {
- storagePermissionTextView.visibility = View.GONE
- }
-