Hi Dianne,

  I am requesting WRITE_EXTERNAL_STORAGE permission. Is that enough or do i
need some other permission?

On Mon, Dec 7, 2009 at 1:52 PM, Dianne Hackborn <hack...@android.com> wrote:

> Be sure you are requesting the WRITE_SDCARD permission, which is needed for
> an application to be able to modify data in the SD card.
>
>
> On Fri, Dec 4, 2009 at 3:56 AM, KK <krishnakumar.ramachand...@gmail.com>wrote:
>
>> Hi,
>>
>>  I am very new to Android. I am trying the following code in the
>> android ndk.
>>
>> FILE* fp = fopen("/sdcard/test", "wb")
>> if(NULL == fp)
>> {
>>  return errno;
>> }
>> int written = fwrite("Test", 1, 4, fp);
>> if(4 != written)
>> {
>>  return -1;
>> }
>> fclose(fp);
>>
>> return 0;
>>
>> I am trying this on emulator and I have created and sdcard for the
>> emulator. The function returns 0. When I check the sdcard, a file with
>> the name is created, but it is empty. Can anyone please help me on
>> this?
>>
>> Thanks in advance
>>
>> --
>> 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
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>  --
> 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

Reply via email to