Java Code Examples for android.app.Activity#getFilesDir()
The following examples show how to use
android.app.Activity#getFilesDir() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlayerFragment.java From AudioVideoPlayerSample with Apache License 2.0 | 6 votes |
/** * start playing */ private void startPlay() { if (DEBUG) Log.v(TAG, "startRecording:"); final Activity activity = getActivity(); try { final File dir = activity.getFilesDir(); dir.mkdirs(); final File path = new File(dir, "easter_egg_nexus9_small.mp4"); prepareSampleMovie(path); mPlayerButton.setColorFilter(0x7fff0000); // turn red // mPlayer = new MediaVideoPlayer(mPlayerView.getSurface(), mIFrameCallback); mPlayer = new MediaMoviePlayer(mPlayerView.getSurface(), mIFrameCallback, true); mPlayer.prepare(path.toString()); } catch (IOException e) { Log.e(TAG, "startPlay:", e); } }