열성만 믿고 사는 앱개발자 또 한번 고수님들의 조언 부탁드립니다.


캘러리에 아래 소스와 같이 이미지를 삽입하였습니다.


그런데 이미지가 캘러리에서 보이지 않습니다.

SD카드의 /DICM/MYPICS/ 홀더를 보면 정확히 이미지들이 삽입되였는데도 말입니다.


그런데 이상한 것은 한 반나절 이것저것 뒤적이다 보면 캘러리에서 새로 추가한 이미지들이 보인다는겁니다.


??...


캘러리에 이미지가 추가되면 그 정보가 즉시 갱신되지 않는건가요?


(두서없이 적었습니다. 성의없다 욕많이 하세요~)



//==============================================================================

// It is downloaded to gallery! 

private boolean localSavedImage( int nCountry, int quality) {

     // Image folder create.

     File sdcard = Environment.getExternalStorageDirectory();

     File albumDir = new File(sdcard, "DCIM/MyPics");

     if (!albumDir.exists())

     albumDir.mkdirs();

    String szFile = albumDir + "/pics.png";

     File imgFile = new File(szFile);


try {

FileOutputStream  fos = new FileOutputStream(imgFile);

BufferedOutputStream bos = new BufferedOutputStream(fos);


Bitmap bmp = createImage("img\myPhotos001.png"); //createImage()는 asserts홀더의 이미지를 로드하는                                                                                                              // 함수입니다. 제가 마든거라 표준이 아닙니다.

bmp.compress(CompressFormat.PNG, 100, bos);

bos.flush();

bos.close();

bos = null;

bmp = null;

fos = null;


} catch (Exception e) {

albumDir  = null;

imgFile = null;


e.printStackTrace();

return false;


albumDir  = null;

imgFile = null;


return true;

}