현재화면을 캡쳐해서 파일로 저장하는 코딩인데요.

 

public int mFileNumber = 0;

 

  Bitmap captureView = container.getDrawingCache();
    FileOutputStream fos;
    try {
     fos = new FileOutputStream(Environment.getExternalStorageDirectory().toString()+"/"+mFileNumber+".jpeg");
     captureView.compress(Bitmap.CompressFormat.JPEG, 100, fos);
    } catch (FileNotFoundException e) {
     e.printStackTrace();
    }
    Toast.makeText(getApplicationContext(), "Captured!", Toast.LENGTH_LONG).show();
   
   }

 

 

 

이렇게하면 매번 0.jpeg 로 덮어쒸어지기 되잖아요

 

이렇게말고  매번저장할때마다 다른이름으로 저장 할수 있는 방법은 없을까요??

 

ㅠㅠ

여기서 어떻게 더 고쳐주어야되는건지 잘 모르겠어요...ㅜ.ㅠ

부디 작은답변이라도 주시면 감사드리겠습니다.