The same points as *res/raw and assets:
1. The files in both directories will be stored intact in the APK package after packaging, and will not be compiled into binary.
Different points of *res/raw and assets:
The files in the 1.res/raw are mapped to the R.java file, and the files under the R.id.filename;assets folder are not mapped to R.java when accessed, and Assetmanager classes are required for access.
2.res/raw can not have a directory structure, and assets can have a directory structure, that is, assets directory can be re-established folder
* Read File resources:
1. Read the file resource under the Res/raw, and get the input stream for write operation in the following way
2. (1) reads the file resource under assets and obtains the input stream for write operations in the following way
-
< Span style= "margin:0px; padding:0px; " >assetmanager am = null ;
-
< Span style= "margin:0px; Color:rgb (0, 0, 0); padding:0px; " >am = Getassets ();
-
inputstream is = Am.open (
(2) If you use Videoview to play:
Videoview.setvideouri (Uri.parse ("android.resource://" + getpackagename () + "/" + R.raw.movie));
Android Raw and assets differences