protected void onActivityResult (int requestCode, int resultCode, Intent data){
switch(requestCode){
case addweight_code :
if(resultCode == Activity.RESULT_OK) {
try{
FileOutputStream fos;
fos = openFileOutput("weight" + date, //////////////////////////////////////// weightYYMMDD.txt 몸무게 1일 1개
Context.MODE_PRIVATE);
this.weight = data.getStringExtra("inputed").getBytes();
fos.write(this.weight);
CalBmi calbmi = new CalBmi(this.weight, this.profile);
fos = openFileOutput("bmi"+ date,
Context.MODE_PRIVATE);
this.bmi = calbmi.getBmi().getBytes();
fos.write(this.bmi);
fos.close();
}catch (Exception e){
Toast.makeText(getApplicationContext(),"실패", Toast.LENGTH_SHORT).show();
}
}
break;
}
updateActivityData();
}
switch(requestCode){
case addweight_code :
if(resultCode == Activity.RESULT_OK) {
try{
FileOutputStream fos;
fos = openFileOutput("weight" + date, //////////////////////////////////////// weightYYMMDD.txt 몸무게 1일 1개
Context.MODE_PRIVATE);
this.weight = data.getStringExtra("inputed").getBytes();
fos.write(this.weight);
CalBmi calbmi = new CalBmi(this.weight, this.profile);
fos = openFileOutput("bmi"+ date,
Context.MODE_PRIVATE);
this.bmi = calbmi.getBmi().getBytes();
fos.write(this.bmi);
fos.close();
}catch (Exception e){
Toast.makeText(getApplicationContext(),"실패", Toast.LENGTH_SHORT).show();
}
}
break;
}
updateActivityData();
}
씨팔 이거 왜자꾸 실패뜰까
왜 파일출력을 못하니
질문은 (질문글)태그를
그럼 사람들이 누르지조차않음
2
3
4
ㅋㅋㅋㅋㅋ
사람들은누르지않지만 코세는누르겠지
그리고아무도 답을하지않았다
ㅋㅋ 좃밥이네
예외처리 안배움?ㅋㅋ 님아 왜실패뜨는지 볼려면 굳이 토스트에 실패라하지말고 실패이유를 출력하게하세염ㅋㅋ
Exception e는 왜했음 그럴거면 ㅋㅋㅋ
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ