2011-10-30 13 views

答えて

0

でグリッドを開く必要がありますいくつかのコードですが、私はそれが有用であることを願って:

// Get directory where camera images are stored 
    String state = Environment.getExternalStorageState(); 
    File imageDir = null; 
    if (Environment.MEDIA_MOUNTED.equals(state) || Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) { 
     File externalDir = Environment.getExternalStorageDirectory(); 
     imageDir = new File(externalDir, "DCIM/camera"); 
     if (!imageDir.exists()) 
      /* Handle error */; 
    } 

    // List filenames of images 
    String[] fileNames = imageDir.list();