At the bottom of the section in Google's dev guide on expansion files (http://developer.android.com/guide/market/expansion-files.html#ZipLib) there is the following text.
APEZProvider - Most applications don't need to use this class. This
class defines a ContentProvider that marshals the data from the ZIP
files through a content provider Uri in order to provide file access
for certain Android APIs that expect Uri access to media files. The
sample application available in the Apk Expansion package demonstrates
a scenario in which this class is useful to specify a video with
VideoView.setVideoURI(). See the sample app's class
SampleZipfileProvider for an example of how to extend this class to
use in your application.
The sample application in question doesn't contain this class. But it does contain a reference to a .SampleVideoPlayerActivity file in the AndroidManifest.xml, which is not present in the project either.
Has anyone tried to implement a concrete class based on the APEZProvider
and used it with VideoView.setVideoURI()
?
I have implemented the class:
public class ZipFileContentProvider extends APEZProvider {
@Override
public String getAuthority() {
return "com.myCompany.myAppName.provider.ZipFileContentProvider";
}
}
But I don't know how to use it with the VideoView.setVideoURI()
call. Can anyone help?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…