src/main/java/de/dennisguse/opentracks/ui/markers/MarkerUtils.java
static Pair<Intent, Uri> createTakePictureIntent(Context context, Track.Id trackId) {
        File dir = FileUtils.getPhotoDir(context, trackId);

        String fileName = SimpleDateFormat.getDateTimeInstance().format(new Date());
        File file = new File(dir, FileUtils.buildUniqueFileName(dir, fileName, JPEG_EXTENSION));

        Uri photoUri = FileProvider.getUriForFile(context, FileUtils.FILEPROVIDER, file);
        Log.d(TAG, "Taking photo to URI: " + photoUri);
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE)
                .putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
        return new Pair<>(intent, photoUri);
    }
/**
     * Sends a take picture request to the camera app.
     * The picture is then stored in the track's folder.
     *
     * @param context the context
     * @param trackId the track id
     */
Sends a take picture request to the camera app.
The picture is then stored in the track's folder.

@param context the context
@param trackId the track id
Sends a take picture request to the camera app . The picture is then stored in the track ' s folder . @param context the context @param trackId the track id
static Pair<Intent, Uri> createTakePictureIntent(Context context, Track.Id trackId) {
        File dir = FileUtils.getPhotoDir(context, trackId);
        String fileName = SimpleDateFormat.getDateTimeInstance().format(new Date());
        File file = new File(dir, FileUtils.buildUniqueFileName(dir, fileName, JPEG_EXTENSION));
        Uri photoUri = FileProvider.getUriForFile(context, FileUtils.FILEPROVIDER, file);
        Log.d(TAG, "Taking photo to URI: " + photoUri);
        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE)
                .putExtra(MediaStore.EXTRA_OUTPUT, photoUri);
        return new Pair<>(intent, photoUri);
    }
static Pair < Intent , Uri > createTakePictureIntent ( Context context , Track . Id trackId ) { File dir = FileUtils . getPhotoDir ( context , trackId ) ; String fileName = SimpleDateFormat . getDateTimeInstance ( ) . format ( new Date ( ) ) ; File file = new File ( dir , FileUtils . buildUniqueFileName ( dir , fileName , JPEG_EXTENSION ) ) ; Uri photoUri = FileProvider . getUriForFile ( context , FileUtils . FILEPROVIDER , file ) ; Log . d ( TAG , "Taking photo to URI: " + photoUri ) ; Intent intent = new Intent ( MediaStore . ACTION_IMAGE_CAPTURE ) . putExtra ( MediaStore . EXTRA_OUTPUT , photoUri ) ; return new Pair < > ( intent , photoUri ) ; }
Sends a take picture request to the camera app.
Sends a take picture request to the camera app .