Android custom video capture file path not working -


I am working in an application that should launch the camera application using the intents; The camera is launched in photo or video mode and so far it works and saves the resulting file in sdcard. The problem now is that, when designating a new custom file name, the picture works for intentions, it seems that the camcorder is not being used for intentions; In fact, EXTRA_OUTPUT or just ignore the "Output" video intent I am using the following code:

For pictures (all the works are amazing, in which to save the photo with the custom file name Also included)

  // Create new image files like unique picture names Picture_03161185528 ​​.jpg fileName = makeFileName ("picture") + ".jpg"; Path = (new stringbilder ()) attached (Environment.getExternalStorageDirectory ()). Attached ("/" + file name) .toString (); File file = new file (path); Ure OutputFile URI = Uri.framefile (file); Intent Intent = New Intent (MediaStore.action_IMUNCUCCT); Intent.putExtra ("Output", OutputFile URI); Main activity. Startactivityfororisult (intent, camera science);   

For video (this takes video, but always uses default names like Vdomain, Video 002, etc., Custom file name is not required)

  / / create new unique filenames such as Video_03161185528.3gp fileName = makeFileName ("video") + ".3gp"; // Also try this hardwired file name ... but nothing filename = "video.3gp"; Path = (new stringbilder ()) attached (Environment.getExternalStorageDirectory ()). Attached ("/" + file name) .toString (); File file = new file (path); Ure OutputFile URI = Uri.framefile (file); Intent to intent = new intent (mediastore.action_wedicular); // is being ignored, the file is always saved under the default file name intent.putExtra ("Output", outputFileUri); // is similar to the same line ... seems intent. Input Extra (MediaStore.extra_utetup, outputfileURI); Main activity. Initial folder (intent, VIDEO_RESULT); In any case, photo intent saves pictures with my custom file names, but video intentively ignores it and always uses files using default file names. Saves. My question is:  

a) Can I do this using custom file names? B) Or alternatively there is no way to know the next available default file name forehand?

Cheers and thank you!

Aram

I want to insert a line in MediaStore which calls me intent Prior to doing, Yuri returns to the future video. Once you have Yuri, you can take any action on file.

  ContentValues ​​value = new content value (); Values.put (MediaStore.Video.Media.TITLE, "Video Name"); Values.put (MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis ()); // videoUri = mediastore path videoUri = CaptureContentFragment.this.getActivity (). GetContentResolver () Insert (MediaStore.Video.Media.EXTERNAL_CONTENT_URI, Value); // New intention intent = create new intent (MediaStore.ACTION_VIDEO_CAPTURE); Intent.putExtra (MediaStore.EXTRA_OUTPUT, videoURI); Intent.putExtra (MediaStore.EXTRA_VIDEO_QUALITY, 1); Intent.putExtra (MediaStore.EXTRA_DURATION_LIMIT, 20); CaptureContentFragment.this.getActivity (). StartActivityForResult (intent, TabsActivity.VIDEO_REQUEST_CODE);    

Comments