String state = Environment.getExternalStorageState();
if(state.equals(Environment.MEDIA_MOUNTED)==false){
Toast.makeText(this,"외부 스토리지 실패",Toast.LENGTH_SHORT).show();
}
edit = (GridView) findViewById(R.id.in);
Button writeButton = (Button) findViewById(R.id.aa2);
writeButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
File file = new File(getExternalFilesDir(null), FILENAME);
try {
OutputStream os = new FileOutputStream(file);
os.write(edit.getBytes());
os.close();
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
이런식으로 데이터를 받으려고 하는데 os.write에 gridview값으로 text 파일 만드려고하는데... 막혓습니다. 도와주세요 ㅠ