Som alla andra (tydligen) så får jag FileNotFound på raden där jag kör
"openFileOutput". Borde det inte funka i en activityklass? Vad tusan
är fel? Jag har läst trådar till förbannelse men hittar ingen lösning.
/Micke
import java.io.FileOutputStream;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
public class firstActivity extends Activity {
public firstActivity(){
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.maininterface);
String fil = "test";
String string = "test";
FileOutputStream fos;
fos = openFileOutput(fil, Context.MODE_PRIVATE);
fos.write(string.getBytes());
fos.close();
}
}
--
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