How to write a file with directory ?

by sunwrt » Fri, 17 Apr 2009 16:26:35 GMT

Sponsored Links

I  wrote a file to the sdcard, but it failed as follow:

   String sdcardFIle = "/sdcard/xxx.txt"
   FileOutputStream fos = openFileOutput(sdcardFile,

openFileOutput failed, because fIle  "/sdcard/xxx.txt" contains a path

It is so strange. Is there  another way to handle the situation ???

Thanks in advance

Other Threads

1. Low Memory: No more background processes.


I am working on openGles with seven images displayed on the screen. I
am translating the position of these seven images on a button click so
it is drawing every time it seems.
But, after sometime all the images are getting disappeared then I've
checked in the logcat
I found this :ctivityManager(52): Low Memory: No more background

Could someone please post the solution to this problem?



2. ADC2 Challenge


I am aware that this challenge is only open to Apps or developers who
have not published their apps on the Android Market before 1st

But my question is this:

a) What is stopping a developer from just changing the name of his/her
app or renaming the app package? Surely others will try this?
b) Are there any developers here that created apps in anticipation for
the ADC2 to only find that by publishing on the Android Market, you
will lose out on the eligibility clause?




3. CTS fails for

4. About App names in ADC and Market

5. text view focus

6. Emulator does not show up when using self-build kernel

7. Emulator does not show up when using self-build kernel