I also wonder if you could find a solution?
Edit: The solution is RTFM. Based on the chapter "Content Providers", my code that worked:
// Save the name and description of a video in a ContentValues map. ContentValues values = new ContentValues(2); values.put(MediaStore.Video.Media.MIME_TYPE, "video/mp4"); // values.put(MediaStore.Video.Media.DATA, f.getAbsolutePath()); // Add a new record (identified by uri) without the video, but with the values just set. Uri uri = getContentResolver().insert(MediaStore.Video.Media.EXTERNAL_CONTENT_URI, values); // Now get a handle to the file for that record, and save the data into it. try { InputStream is = new FileInputStream(f); OutputStream os = getContentResolver().openOutputStream(uri); byte[] buffer = new byte[4096]; // tweaking this number may increase performance int len; while ((len = is.read(buffer)) != -1){ os.write(buffer, 0, len); } os.flush(); is.close(); os.close(); } catch (Exception e) { Log.e(TAG, "exception while writing video: ", e); } sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri));
Gabor source share