diff --git a/app/src/main/java/org/ntlab/amaryllis/client/fragment/MapsFragment.java b/app/src/main/java/org/ntlab/amaryllis/client/fragment/MapsFragment.java index ebc0642..6937d10 100644 --- a/app/src/main/java/org/ntlab/amaryllis/client/fragment/MapsFragment.java +++ b/app/src/main/java/org/ntlab/amaryllis/client/fragment/MapsFragment.java @@ -96,7 +96,8 @@ private int count = 0; private Location loc; File file; - static final String filePath = Environment.getExternalStorageDirectory() + "/sample.3gp"; + //static final String filePath = Environment.getDataDirectory() + "/sample.3gp"; + //static final String filePath = Environment.getExternalStorageDirectory() + "/sample.3gp"; Button RecordButton; Button PlaybackButton; private double latitude, longitude; @@ -406,9 +407,9 @@ //録音開始&録音終了 private void startRecord() { - File wavFile = new File(filePath); final ImageView R_Stoping = getView().findViewById(R.id.R_Stoping); final ImageView R_Playing = getView().findViewById(R.id.R_Playing); + String filePath = this.getActivity().getExternalFilesDir(null).getAbsolutePath() + "/sample.3gp"; if (StartChange == 0) { try { FileInputStream in = new FileInputStream(filePath); // ファイル読み込み用 @@ -479,6 +480,7 @@ private void startPlay() { final ImageView Stoping = getView().findViewById(R.id.Stoping); final ImageView Playing = getView().findViewById(R.id.Playing); + String filePath = this.getActivity().getExternalFilesDir(null).getAbsolutePath() + "/sample.3gp"; float Tmin = 0; float Tmax = 255; //mp = new MediaPlayer();