I didn't see Mark's reply before I posted mine, sorry. As always, Mark is on top of this group ;).
On Jul 27, 11:16 am, Charlie Collins <charlie.coll...@gmail.com> wrote: > Files created with Context.openFileOutput are in the "context" they > were created in. 99% of the time you don't really care what that > physical location is, you just retrieve the same file using the name > with Context.openFileInput. > > If memory serves the actual physical location is /data/data/ > package_name/, or somewhere nearby. You can use the ADB or the Eclipse > plugin file browser to browse around and find the exact location. The > reason this is usually irrelevant though, is the permissions will only > be set for the application that stored it, you can't access it from > other apps anyway (not if created with openFileOutput). > > On Jul 27, 10:51 am, Lorenz <lorenzoteod...@gmail.com> wrote: > > > Hi, > > I've a problem with method openFileOutput(), I can't find the file or > > the directory where the file is stored..the code is: > > import java.io.BufferedWriter; > > import java.io.FileNotFoundException; > > import java.io.FileOutputStream; > > import java.io.IOException; > > import java.io.OutputStreamWriter; > > import java.io.PrintWriter; > > > import android.app.Activity; > > import android.app.AlertDialog; > > import android.content.Context; > > import android.os.Bundle; > > import java.io.*; > > import java.net.*; > > import java.util.NoSuchElementException; > > import java.util.Scanner; > > > public class C extends Activity { > > /** Called when the activity is first created. */ > > private PrintWriter savedpoint; > > > @Override > > public void onCreate(Bundle savedInstanceState) { > > super.onCreate(savedInstanceState); > > setContentView(R.layout.main); > > try{ > > > savedpoint = new PrintWriter(openFileOutput > > ("Data.dat",MODE_APPEND)); > > > for(int i=0;i<20;i++) > > { > > savedpoint.println(-78.443221+"i"+" "+120.344423+"i"); > > > } > > > }catch (FileNotFoundException e) { > > e.printStackTrace(); > > } > > } > > > } > > > and the manifest is: > > > <?xml version="1.0" encoding="utf-8"?> > > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > > package="prova.client" > > android:versionCode="1" > > android:versionName="1.0"> > > <application android:icon="@drawable/icon" android:label="@string/ > > app_name"> > > <activity android:name=".C" > > android:label="@string/app_name"> > > <intent-filter> > > <action android:name="android.intent.action.MAIN" /> > > <category > > android:name="android.intent.category.LAUNCHER" /> > > </intent-filter> > > </activity> > > </application> > > <uses-sdk android:minSdkVersion="3" /> > > </manifest> > > > Any idea?where can I find the directory where is stored the file? > > thanks --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---