Created file is not visible in the gallery, but is visible in a sdcard folder



I've added a video file in /mnt/sdcard/DCIM/somefolder
But it is not visible in the gallery.
Could anyone help me please to understand what is wrong?


File dir = new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DCIM), "/somefolder");
if (!dir.exists()) {
dir.mkdirs();
}
mrec.setOutputFile(dir.getPath() + "/video" + ".mp4");

Related to : Created file is not visible in the gallery, but is visible in a sdcard folder
Created file is not visible in the gallery, but is visible in a sdcard folder
Programming Languages

I've added a video file in /mnt/sdcard/DCIM/somefolder
But it is not visible in the gallery.
Could anyone help me please to understand what is wrong?


File dir = new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_DCIM), "/somefolder");
if (!dir.exists()) {
dir.mkdirs();
}
mrec.setOutputFile(dir.getPath() + "/video" + ".mp4");

Created folder in sdcard is not visible through WindowsExplorer
Programming Languages

Hi Community,
I have created a folder in SdCard using a code below:
Quote:
if (Environment.MEDIA_MOUNTED.equals(state)) {
// We can read and write the media
Log.v("Storage","ablo to read and write");
//create Beatss folder
File direct = new File(Environment.getExternalStorageDirectory() + "/Beatss");
boolean success = true;
if (!direct.exists()) {
success =
Created folder is not visible in the file explorer..
Programming Languages

I have a problem with creating a folder and a file on the sdcard.


Here's the code:


File folder = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString() + "/folder");
boolean success;
if (!folder.exists()) {
success = folder.mkdirs();
}
File obdt = new File(folder, "file.txt");
try {
success = obdt.createNewFile();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

With this code I expect to create the folder

create visible folder sdcard, Android
18/11/2014 10:40 am Programming Languages

I'm developping an application where I need to create new folders/files in the sdcard. The thing is I can see them using a root explorer but not with the default one which comes with Android.

I've taken a look at several similar questions here but don't seem to work for me.

For sure, I'm using in my manifest this:

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

and I'm writing all the Files using:

String path = Environment.getExternalStorageDirectory() +
"/FolderName/FileName.format"

but as I said, these new folders/files remained hidden and can only be seen using a root explorer. Neither the folder nor file name starts with "."

Thanks in advance.




HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .