getFilesDir(), I suppose.

On Fri, May 11, 2012 at 2:21 PM, JediDroid <[email protected]> wrote:
>
> Hello,
>
> I know the "if statement" section of the code below is successful for
> accessing the sd card when its mounted.
>
> Please tell me what code to use in the "else if statement" section to access
> device internal storage (internal flash storage)?
>
> My code:
>
> String state = Environment.getExternalStorageState();
>
> if (Environment.MEDIA_MOUNTED.equals(state)) {
>
> // Try to make directory on the SDcard.
> subdirectory = Environment.getExternalStoragePublicDirectory("MyDirectory");
>
> // Make sure the directory exists.
> subdirectory.mkdirs();
>
> } else if (-- What code to use here to access device internal storage? --) {
>
>                 // What code to use below to access device internal storage?
>
> // Is this the correct code to make a directory on device internal storage?
> subdirectory = Environment.getExternalStoragePublicDirectory("MyDirectory");
>
> // Make sure the directory exists.
> subdirectory.mkdirs();
>
> } else {}
>
>
> Reference to using the methods:
> getExternalStorageState()  and  getExternalStoragePublicDirectory()
> http://developer.android.com/reference/android/os/Environment.html#getExternalStorageState()
>
>
> Thank you for your help.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to