Monday 3 August 2015

Play video from uncompressed zip fill (obb)

I've not posted anything to my blog in along time,
But getting this to work get so round up I want help anybody else that might run into it.

So you might have an Android app that required the playback of large local videos mp4s for example.

That might take your app size over 50mb which means that you have to package your larger assets up as apk expansion files.

So first off go read this..
http://developer.android.com/google/play/expansion-files.html


Then package your mp4s up as non compressed zip file. Im on windows and to do this I used 7 zip file manager.

then rename it to .obb file as described in the above documentation.

Once you have it on a device to test.

Create a class like this...
[code]
public class ZipFileContentProvider extends APEZProvider {

    @Override
    public String getAuthority() {
        return "com.adt.adtfordapp.ZipFileContentProvider";
    }
}
[/code]


and in your manifest add a provider under application (not in activitiy)
""""