On Sun, Jul 24, 2011 at 4:29 PM, guruk <[email protected]> wrote:
> Hi there,
> i always did wrote to sd card with
>
> String baseDir =
> Environment.getExternalStorageDirectory().getAbsolutePath();
>
> String fileName = DATABASE_TABLE + ".myd";
>
> File f = new File(baseDir + File.separator + fileName);
>
> FileWriter gpxwriter = new FileWriter(f);
>
> BufferedWriter out = new BufferedWriter(gpxwriter);
>
>                 // ------------
>
> now i came about the permission: WRITE_EXTERNAL_STORAG
>
> I NEVER used/implemented that permission into my manifest.
>
> So what?
>
> I have android:minSdkVersion="2"
>
> and my building target is 8 android:minSdkVersion="2" (android 2.2)
>
> does it have to do with that?

Yes. You automatically get WRITE_EXTERNAL_STORAGE for old minSdkVersions.

> I am just wondering WHY can i write to sdcard without that permission.
>
> and why should i implement it?

Because someday you will increase the minSdkVersion and no longer be
able to write to external storage.

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

Android Training in NYC: 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