Home > Mobile > Why can't, genuflect is begged openFileOutput () function call
Why can't, genuflect is begged openFileOutput () function call
Time:04-08
Post for the first time, 50 points to the great god see, why can't this function call, the application permissions are applied for, change of import should be imported, why not call ahhh? !!!!! ?
private void the output () {
The String content=TvTagUii. GetText (). The toString (); FileOutputStream fos;
Try { Fos=openFileOutput (" data. TXT ", MODE_PRIVATE); Fos. Write (content. getBytes ()); fos.close(); /* PrintStream ps=new PrintStream (fos); Ps. Println (content); Ps. The close (); fos.close(); */
} the catch (Exception e) { e.printStackTrace(); }
This here need a Context instances such as Activity, you this output () method is to write in a certain Activity? If not, then you need a Context instance and then points out the openFileOutput method