안드로이드 개발 질문/답변
(글 수 45,052)
main activity의 클래스파일에서
FileOutputStream fos = openFileOutput(o_fname, Context.MODE_PRIVATE);
와 같은 코드는 정상적으로 되는데..
엑티비티(화면) 없는 클래스를 만들어서 사용하려고 하는데..
그 클래스에서는 저렇게 소스코드를 작성하게 되면..
openFileOutput 에 빨간 줄 그어지면서
Cannot make a static reference to the non-static method openFileOutput(String, int) from the type ContextWrapper
이라고 나옴니다.ㅠ
InputStream ins = getResources().openRawResource(i_resid);
에도 getResources()에 빨간줄 그어지며 같은 이야기가 나오구요....
일단 ins 는 raw데이터를 가지고 오려고하는거같은데...
안되면 인터넷을 통해 받아서 내장메모리에 저장하고 싶어서..
openFileOutput 은 꼭 써야할것 같은데.. 방법좀 알려주세요.ㅠ
수고하세요.