AndroidManifest.xml:
<provider android:authorities="com.mygame.expansion" android:exported="false" android:multiprocess="true" android:name="org.apache.cordova.xapkreader.XAPKProvider" />
I have an APEZProvider
class, which comes from the Android SDK /extras folder. It extends ContentProvider
.
I also have a XAPKProvider
class, which extends APEZProvider
:
public class XAPKProvider extends APEZProvider {
@Override public String getAuthority () {return "com.mygame.expansion";}
public int mainFileVersion = 0;
public int patchFileVersion = 0;
@Override public boolean initIfNecessary () {
if (mInit) return true;
Context ctx = getContext ();
try {
mAPKExtensionFile = APKExpansionSupport.getAPKExpansionZipFile (ctx, mainFileVersion, patchFileVersion);
mInit = true;
return true;
} catch (IOException e) {
e.printStackTrace ();
}
return false;
}
}
How can I access the ContentProvider
object created in the AndroidManifest.xml file, so that I can modify the mainFileVersion
and patchFileVersion
variables?