0

In my android application, I am running a background Service and the service runs some code if a user takes a picture from facebook application. The service is doing that by using fileobserver to observe storage/emulated/0/Pictures/Facebook/ folder. If this folder path Different than mine in different devices, how can I find The correct folder path in my application?

Thank you

user2858924
  • 433
  • 5
  • 15

1 Answers1

0

You can find the correct folder path using the Environment class like:

File path = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "Facebook");
Niki van Stein
  • 10,564
  • 3
  • 29
  • 62
Woody Guo
  • 43
  • 6