Difference between android raw and assets: androidrawassets
* Similarities between res/raw and assets:
1. Files in the two directories will be stored in the apk package intact after packaging, and will not be compiled into binary.
* Differences between res/raw and assets:
1. files in res/raw will be mapped to R. in the java file, the resource ID is R. id. filename; files in the assets folder will not be mapped to R. in java, the AssetManager class is required for access.
2. res/raw cannot have a directory structure, while assets can have a directory structure, that is, folders can be created under the assets Directory.
* Read File resources:
1. Read the file resources under res/raw and get the input stream for write operations in the following ways
- InputStream is = getResources (). openRawResource (R. id. filename );
2. (1) read the file resources under assets and obtain the input stream for write operations in the following ways:
- AssetManager am =Null;
- Am = getAssets ();
- InputStream is = am. open ("filename ");
(2) If Videoview is used for playback:
VideoView. setVideoUri (Uri. parse ("android. resource: //" + getpackageName () + "/" + R. raw. movie ));
(To: http://www.cnblogs.com/lianghui66/p/3248636.html)