-
public class FileUtils
-
-
Method Summary
Modifier and Type Method Description static StringgetAppName()static UrigetCaptureUri(Context context, String type, String ext)generate output fileuse media store to create media file directly, updating media store manually by MediaScannerConnection.scanFile is unnecessary. static UrigetCaptureUri(Context context, String type, String prefix, String ext)static FilegetCaptureFile(Context context, String type, String ext)create file for saving movie / still image file static FilegetCaptureFile(Context context, String type, String prefix, String ext)need WRITE_EXTERNAL_STORAGE permission static FilegetCaptureDir(Context context, String type)static StringgetDateTimeString()static StringgetExternalMounts()-
-
Method Detail
-
getAppName
@NonNull() static String getAppName()
-
getCaptureUri
static Uri getCaptureUri(Context context, String type, String ext)
generate output fileuse media store to create media file directly, updating media store manually by MediaScannerConnection.scanFile is unnecessary.
- Parameters:
type- Environment.DIRECTORY_MOVIES / Environment.DIRECTORY_DCIM etc.ext- .mp4(.m4a for audio) or .
-
getCaptureUri
static Uri getCaptureUri(Context context, String type, String prefix, String ext)
-
getCaptureFile
static File getCaptureFile(Context context, String type, String ext)
create file for saving movie / still image file
- Parameters:
type- Environment.DIRECTORY_MOVIES / Environment.ext- .mp4 .png or .
-
getCaptureFile
static File getCaptureFile(Context context, String type, String prefix, String ext)
need WRITE_EXTERNAL_STORAGE permission
-
getCaptureDir
static File getCaptureDir(Context context, String type)
-
getDateTimeString
static String getDateTimeString()
-
getExternalMounts
static String getExternalMounts()
-
-
-
-