不同手机拍照之后的保存路径不一样

没有找到合适的 目前 我的做法是 文件浏览 然后在找 有更好的解决办法希望跟帖谢谢

package com.fileUpload;

  import java.io.File;
  import java.util.ArrayList;
  import java.util.List;
  import android.app.AlertDialog;
  import android.app.ListActivity;
  import android.content.DialogInterface;
  import android.content.Intent;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  import android.widget.TextView;

  public class FileExplorer extends ListActivity {

  private List<String> item = null;
  private List<String> path = null;
  private String root="/";
  private TextView myPath;

  /** Called when the activity is first created. */
  @Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.file);
    myPath = (TextView)findViewById(R.id.path);
    getDir(root);
}

private void getDir(String dirPath)
{
 myPath.setText("Location: " + dirPath);

 item = new ArrayList<String>();
 path = new ArrayList<String>();

 File f = new File(dirPath);
 File[] files = f.listFiles();

 if(!dirPath.equals(root))
 {

  item.add(root);
  path.add(root);

  item.add("../");
  path.add(f.getParent());

 }

 for(int i=0; i < files.length; i++)
 {
   File file = files[i];
   path.add(file.getPath());
   if(file.isDirectory())
    item.add(file.getName() + "/");
   else
    item.add(file.getName());
 }

 ArrayAdapter<String> fileList =
  new ArrayAdapter<String