4

I am on the verge of creating a OBB file just for adding my video which is around 80 MB. I am trying to create a obb file via Win RAR with the naming convention main.2.my.package.name.obb and I am indeed using the mentioned Store format for zipping my file. A screenshot - . When I try to run the following code

        ZipFileContentProvider contentProvider = new ZipFileContentProvider();
        String contentPath = "content://my.package.name.provider";
        File root = Environment.getExternalStorageDirectory();
        String EXP_PATH = File.separator + "Android" + File.separator + "obb" + File.separator;
        String path = root.toString() + EXP_PATH + getPackageName() + File.separator + "main.2.dmcc.mea.golive.golive.obb";
        String zipFileName =  contentPath + path + "/" + "video/app_video.mp4";
        Log.e("The URI is ", "" + zipFileName);
        uri = Uri.parse(zipFileName);


public class ZipFileContentProvider extends APEZProvider {

    @Override
    public String getAuthority() {
        return "my.package.name.provider";
    }
}

The one in the manifest goes like :

        <provider
            android:name="my.package.name.ZipFileContentProvider"
            android:authorities="my.package.name.provider"
            android:exported="false"
            android:multiprocess="true" />
        <meta-data
            android:name="mainVersion"
            android:value="1"></meta-data>

So, I try to test it by placing the generated OBB file in my sdcard/Android/obb but I get a IllegalStateException while trying to access the file. A screenshot.

And yes, I have tried to create the obb file via JOBB tool available in Android tools but I am one of the unlucky person who gets a error while trying to create a jobb file. I came to know that its a existing bug in Android reported by Google - see here. I've been sitting on this for like almost a decade now.

Bottomline : JOBB doesnt work, thanks to Google and WinRAR seems a bit messed up. I've got absolutely no idea how to proceed further.

My reference links include : Link 1 Link 2 Link 3

I STRONGLY and SERIOSULY presume that the IllegalStateException occurs only due to the fact that the obb file is corrupted or at least that's what I came to know.

Can someone please save me another decade ?

P.S : I am indeed using my real package name, just in case if someone thinks that they are insanely filled with wisdom.

EDIT 1 : I just tested my app via alpha testing but the same error persists. Sad, indeed !!

EDIT 2 : I was doing a idiotic mistake of saving the file with an extension of obb while zipping it where I was supposed to save the file in zip format and upload it in the Play Store which will do the conversion for me. I did so but still facing the same issue.

EDIT 3 : I successfully created a obb file via the JOBB tool from another PC in which the tool seemed to work fine and I tried uploading that obb file. Now when I download it throws me a new error now which is NullPointerException at return mAPKExtensionFile.getAssetFileDescriptor(path). The path is very much right inside the obb file, I guess that its not able to locate the actual obb file itself ! Finally, I'm like "Now I may have Google's permission to die !!"

Community
  • 1
  • 1
San
  • 2,078
  • 1
  • 24
  • 42

0 Answers0