[android-developers] Re: Impossible to Create Write to or Read From Files in the SD Card

2011-10-24 Thread melis
Thanks for all replies! Before reading the commands i went for a walk for 5 minutes. When i turned back tried this code snippet,it worked. I wanted to share for who will have the same problem with me. But i realized createNewFile() function is useless. It creates the file even if i use or not. Is

[android-developers] Re: Impossible to Create Write to or Read From Files in the SD Card

2011-10-24 Thread gjs
Hi, As the doc says - 'This method is not generally useful' public boolean createNewFile () Since: API Level 1 Creates a new, empty file on the file system according to the path information stored in this file. This method returns true if it creates a file, false if the file already existed.

[android-developers] Re: Impossible to Create Write to or Read From Files in the SD Card

2011-10-23 Thread Studio LFP
You're on the right track, but it's best not to hardcode the path to a file on the SD Card. Check out this API: http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory%28%29 This will help you get the directory to the SD card. It usually isn't /sdcard,