0

kindly guide me where the following code is creating folder? i didnt find it. and i also wanted to know about this function [getExternalStorageDirectory()] that what location it returns in sd card?

MY_IMG_DIR = new File(
                    Environment.getExternalStorageDirectory(), "/.Plsys/");
MK Bukhari
  • 75
  • 1
  • 9

2 Answers2

1

Folder is created in sdcard but got hidden Because Your foldername start with dot(.).Dont use the dot. Hope it will help.

user2527725
  • 121
  • 1
  • 8
  • MY_IMG_DIR = new File( Environment.getExternalStorageDirectory(), "/Plsys/"); this will allow you to see file "Plsys" inside your sdcard. – user2527725 Feb 24 '15 at 07:49
  • actually i want to do is, to show all images from internal and external memory in an activity. plz help – MK Bukhari Feb 25 '15 at 07:54
0

As stated in the developer refrence of the Android API Android API Reference Environment.getExternalStorageDirectory() returns the root of your "external" storage. Combining this with your string it should return something like "/storage/emulated/0/.Plsys" or similar. Just logcat the file and you wil get a direct path string.

As @user2527725 stated right directories with a dot(.) in front will be hidden on Android.

binloan
  • 303
  • 3
  • 12
  • thnx dear. i want to place images in .Plsys so that images are accessible from gallery. so plz guide me how i show all images in my app's activity and then move selected images to .Plsys – MK Bukhari Feb 25 '15 at 07:59