Hi Mark, can i give path like this... *File images = Environment.getExternalStorageDirectory(); * On Fri, Jan 7, 2011 at 8:18 PM, Mark Murphy <mmur...@commonsware.com> wrote:
> On Fri, Jan 7, 2011 at 9:45 AM, Abhilash baddam > <abhilash.androiddevelo...@gmail.com> wrote: > > I can be able to display all images from Sdcard in emulator,there i > > have given the path like this File images = new File("/sdcard/"); then > it's > > showing all images from SDcard. > > Do not do this. /sdcard is incorrect on Android 2.2+ and some devices. > Use Environment.getExternalStorageDirectory(). > > > Now i want to check the same application on mobile...there i have > > given path like this File images = new File("/sdcard/download/"); because > i > > have downloaded images they stored in download folder...while running the > > application it's showing NullPointerException..i think i have give wrong > > path to show images...what may be the problem??? > > See above. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _The Busy Coder's Guide to Android Development_ Version 3.4 Available! > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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