"widgets" was just an example, the folder and file is: File folder = new File(Environment.getExternalStorageDirectory(), myAppName + "/widgets");
if (!folder.exists()) { folder.mkdirs(); } File file = new File(folder, fileName); On febr. 25, 18:47, TreKing <treking...@gmail.com> wrote: > On Fri, Feb 25, 2011 at 11:17 AM, b_t <bartata...@gmail.com> wrote: > > What is wrong? Should I check something else? > > What is "file"? > Check the result of "mkdirs". > Also, "widgets" is a terrible name for a folder to place at the root of the > user's SD card. There are official ways of creating folders on the SD card > for later versions of Android. At the very least, name it something that > easily identifies it with your app. > > --------------------------------------------------------------------------- > ---------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en