0
I recently updated an APK and chose the option to reuse the expansion file (this file contains videos).
Old version
1(1.0.0) -> main.1.br.com.myapp.obb
New version
2(1.0.1) -> selecionei o mesmo
After propagating in the store (Google Play), the application updated normally, downloaded and recognized the OBB. But when I play the video, the application ends with the error below:
E/AndroidRuntime(12752): java.lang.NullPointerException
E/AndroidRuntime(12752): at com.android.vending.expansion.zipfile.APEZProvider.openAssetFile(APEZProvider.java:182)
Updating
I added part of the files to help identify the error.
Providervideozipuri.java
public class ProviderVideoZipUri extends APEZProvider {
@Override
public String getAuthority(){
return "br.com.appname.provider.ProviderVideoZipUri";
}
}
Androidmanifest.xml
<provider
android:name="br.com.appname.provider.ProviderVideoZipUri"
android:authorities="br.com.appname.provider.ProviderVideoZipUri"
android:exported="false" />
Someone’s been through this trouble?
Thank you very much
You’re putting the apk and patch version as
meta-data
(mainVersion
andpatchVersion
) in the statement of itsAPEZProvider
?– Wakim
I couldn’t find where to set up (mainVersion and patchVersion) on Apezprovider. I own a "Providervideozipuri" class that inherits Apezprovider. In the download routines I set up the version. Interesting that by changing the version to 3, renaming the OBB to "main.3.br.com.myapp.obb" and uploading this new OBB to the store, it worked. I didn’t want to have to change the OBB every APK update. Thank you!
– elirigobeli
The configuration is in the manifest, inside the tag
provider
. In fact you would only trade one or the other. If you updated the apk version, change themainVersion
, if updated the exchange expansion thepatchVersion
.– Wakim
If I understand correctly, I am declaring "Provider" without this TAG. I updated the question with parts of the code.
– elirigobeli