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. How to prevent GLSurfaceView destruction

Hi list,

I am currently porting a 3D app on Android. This app consists of a 3D view
(embedded in a GLSurfaceView) and of menu screens (for settings, search ,

My main activity is the one containing the GLSurfaceView. It's always the
root of it's task. The problem is that my GLSurface gets destroyed whenever
I launch another activity and all the GL objects (VBOs, textures) that I
created in the GL context get deleted/invalidated along. So whenever my
users go in the menu, the 3D scene has to be fully reloaded. Wouldn't there
be a way to prevent the surface's destruction ?

Thanks for any help.



2. What is <protected-broadcast> in android manifest file?

Hey i am seeing in android built-in phone application's manifest a tag
named <protected-broadcast>

android:name="android.intent.action.SERVICE_STATE" />

I goggled but cant managed to understand actually what it means?/


3. Stopped unexpectedly on a real phone but not on the simulator

4. Tool to synchronize String properties betweens differents languages

5. EditText uncontrollable/unpredicatable soft keyboards

6. Activity restart crash after OS kills it

7. Runtime Language change support.