Android 如何使用这段代码

Android 如何使用这段代码,android,android-intent,exif,Android,Android Intent,Exif,这是从jpeg中提取标签的代码。我通过调用camera intent来拍照。点击照片后,我应该发送到下面的代码提取信息。如何将单击的照片作为参数发送 Bundle bundle = getIntent().getExtras(); if(null != bundle) { String filepath = bundle.getString(FILE_PATH_KEY); try { ExifInterface exif = new ExifIn

这是从jpeg中提取标签的代码。我通过调用camera intent来拍照。点击照片后,我应该发送到下面的代码提取信息。如何将单击的照片作为参数发送

Bundle bundle = getIntent().getExtras();
if(null != bundle)
{
     String filepath = bundle.getString(FILE_PATH_KEY);

     try 
     {
        ExifInterface exif = new ExifInterface(filepath);
        StringBuilder builder = new StringBuilder();

        builder.append("Date & Time: " + getExifTag(exif,ExifInterface.TAG_DATETIME) + "\n\n");
        builder.append("Flash: " + getExifTag(exif,ExifInterface.TAG_FLASH) + "\n");
        builder.append("Focal Length: " + getExifTag(exif,ExifInterface.TAG_FOCAL_LENGTH) + "\n\n");
        builder.append("GPS Datestamp: " + getExifTag(exif,ExifInterface.TAG_FLASH) + "\n");
        builder.append("GPS Latitude: " + getExifTag(exif,ExifInterface.TAG_GPS_LATITUDE) + "\n");
        builder.append("GPS Latitude Ref: " + getExifTag(exif,ExifInterface.TAG_GPS_LATITUDE_REF) + "\n");
        builder.append("GPS Longitude: " + getExifTag(exif,ExifInterface.TAG_GPS_LONGITUDE) + "\n");
        builder.append("GPS Longitude Ref: " + getExifTag(exif,ExifInterface.TAG_GPS_LONGITUDE_REF) + "\n");
        builder.append("GPS Processing Method: " + getExifTag(exif,ExifInterface.TAG_GPS_PROCESSING_METHOD) + "\n");
        builder.append("GPS Timestamp: " + getExifTag(exif,ExifInterface.TAG_GPS_TIMESTAMP) + "\n\n");
        builder.append("Image Length: " + getExifTag(exif,ExifInterface.TAG_IMAGE_LENGTH) + "\n");
        builder.append("Image Width: " + getExifTag(exif,ExifInterface.TAG_IMAGE_WIDTH) + "\n\n");
        builder.append("Camera Make: " + getExifTag(exif,ExifInterface.TAG_MAKE) + "\n");
        builder.append("Camera Model: " + getExifTag(exif,ExifInterface.TAG_MODEL) + "\n");
        builder.append("Camera Orientation: " + getExifTag(exif,ExifInterface.TAG_ORIENTATION) + "\n");
        builder.append("Camera White Balance: " + getExifTag(exif,ExifInterface.TAG_WHITE_BALANCE) + "\n");         
        builder = null;
     }
     catch (IOException e) 
     {
        e.printStackTrace();
     }                       

}            
捕获照片的代码

Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                 fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); // create a file to save the image
                 captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file name
                startActivityForResult(captureIntent, CAMERA_CAPTURE);

“如何将照片作为参数发送”是什么意思?您应该将图像的文件路径存储在fileUri中。我有照片的fileUri。我应该把它放在哪里?这里的文件路径键是什么?