-
Notifications
You must be signed in to change notification settings - Fork 467
min_native_interface problem on Android #45
Comments
That's an interesting thing. Looked into project's gradle file - they are increasing the version code of the app without telling anything to the developer... There should be a workaround, I have one idea, but for now - documentation update is the very least, you are right. |
I m unsure about this version code. Is this the same as config.xml version code? |
If you mean version, that is defined like this:
then no. In the
A bit more details about it can be found in the docs. For android Cordova increases it automatically. For example, if you set it to 7 - Cordova's gradle build will increase it to 70. This has something to do with building multiple apk files for different architectures. Especially when you are using crosswalk plugin in your project. |
Thanks Nik, actually I'm using for example: <widget xmlns="http://www.w3.org/ns/widgets"
xmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:gap="http://phonegap.com/ns/1.0"
id="com.whatever.what"
versionCode="80501"
version="8.5.1"> And this is kept when uploading to Google Play. Is this the same as android-versionCode="80501" ? |
Don't see in the documentation anything about Either
Either way - yes, 80501 is the value for |
Interesting... I think I've put this option (version) in 2013 and was in my file since then... Maybe and old one? |
Probably will make |
Hi Nik, I share your feeling about avoiding adding preferences and at the same time I agree that in this case might be better to add a specific option. |
Hi Nik, is the preference option change scheduled yet ? ( min_native_interface as a separate preference in the config.xml) |
Hi @luigi37 , |
Sounds a great plan. Thanks! |
Hi @nikDemyankov , |
Hi @mukesh1908 , Please, read documentation about that. In short right now this is defined only on server side. Native side uses In v1.3.0 of the plugin it will be a separate preference in config.xml. |
Hi, @nikDemyankov , thanks for your reply. So I have to change min_native_interface in chcp.josn manually in the server if I want my app to be downloaded from store instead of updating from server. |
@mukesh1908 Yes. Point of this parameter is to prevent plugin from installing something, that native side doesn't support. And if it is higher on the server, then the version code of the application - it is ignored by the plugin. |
@nikDemyankov so currently there is no way to automate it. I have to make it manually. |
… allowed to download the update from the server. #45
Fixed in v1.3.0. Added |
I was troubleshooting a weird problem with
min_native_interface
not seemingly doing anything.Then I realized that if I had android-versionCode="2", the apk would actually have a version code of 20, 22 or 24 (depending on platform, arm/x86/etc) even though AndroidManifest.xml would show version code as being 2. This can be confirmed by running
aapt dump badging package.apk
.The reason for this behavior is here: https://issues.apache.org/jira/browse/CB-8976
So incrementing the version code for android to
3
in cordova'sconfig.xml
would require settingmin_native_interface
to at least30
.This doesn't happen for iOS, so the version code would still be
3
in this case.The workaround here is to make sure that ios version codes are incremented by 10 in order to keep the android and ios packages in sync.
So for version code 3, the following needs to be done:
<widget id="..." android-versionCode="3" ios-CFBundleVersion="30">
andmin_native_interface
has to be set to30
.This should be added to the
readme
at the very least. I'm not sure if there are any ways to solve it, perhaps one way would be to separatemin_native_interface
intomin_native_interface_android
andmin_native_interface_ios
The text was updated successfully, but these errors were encountered: