Multiple choice technology platforms and products

In Android, SD Card path can be retrieved using _______ method.

  1. Environment.getExternalStorageDirectory()

  2. Context.getExternalStorageDirectory()

  3. Environment.getStorageDirectory()

  4. Context.getStorageDirectory()

  5. None of above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Environment.getExternalStorageDirectory() returns the path to the primary shared/external storage directory. This is the standard Android API for accessing SD card storage. Context does not have a getStorageDirectory() method, and Environment.getStorageDirectory() does not exist.