Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor III
9 Views

Version 3759 Build for Android V6

 

Just updated the CLI to 6.2 and the Target Android API to 19 and 23.

XDK offered to update the CLi and plugins which I accepted although I noticed the plugins were not set to there highest version number which I would have thought should have been the case.

App builds fine.

When running on a Sony Xperia the menu bar that should be at the bottom of the screen appears and the top and any selection on that menu results in a white screen.

The Splash screen appears OK.

I did get the app to appear once on the device but then got an error opening the camera to scan a QR code.

Haven't tested on another device as I don't have another device with Android V6 installed.

App runs fine on V4 devices and iOS devices

Tags (2)
0 Kudos
3 Replies
Highlighted
9 Views

I'm assuming you are building with Crosswalk? If so, set the target SDK level to 21, this is the version of Android that the Crosswalk webview is tested against, which is what the target SDK api level really means. That insures that the app behaves as expected on all versions of Android devices.

Even if you are not using Crosswalk, I recommend that you set that target level to 21, because the version of Android that Cordova 6.2 was tested and verified against is what is important. The Cordova project does not do a very good job of advertising which OS versions they validate against, but my experience is that 21 is your safest bet for proper behavior on devices.

Note that setting the target API level to 21 does not prevent your app from being installed and run on a later version device, it just means the higher rev OS will take certain "precautions" for that app since it is assuming a lower version of the OS.

The min API level does dictate the lowest version of Android that the app is allowed to be loaded onto and run, but there is nothing that specifies a maximum API level.

0 Kudos
Highlighted
New Contributor III
9 Views

Yes it is optimised with Crosswalk and V19 Embedded is selected.
 

I set the Target level to 23 as per https://developer.android.com/about/dashboards/index.html recommendation for V6 of Android because I'm trying to compile for a Sony Xperia XA with Android V6 installed.

It would make sense if the API level was a dropdown allowing you to pick a maximum API level based on the CLI selected as it is not self evident that API 21 is the maximum suggested version.

0 Kudos
Highlighted
9 Views

If you set the API level to 23 (Android v6) you may trigger the new permissions model that was introduced (similar to what is done in iOS and Windows), which requires that your app (and plugins) use some additional APIs to confirm their desire to gain access to certain resources (such as geolocation). If the plugin or underlying Cordova framework does not support those APIs your app is likely to be blocked (hung) on the OS waiting for that API to be called. So I highly recommend you do not target API 23 unless you know for sure that all the third-party plugin code you are using will behave appropriately in that environment. If an app is marked as API 21 a version 6 Android device cannot force it to use APIs that it was not tested for.

Ultimately, you are the one that needs to make that decision, the XDK does not dictate what your app needs, we are simply building standard Cordova apps for you, making it more convenient that using the Cordova CLI, we are not enforcing limitations or restrictions, other than what our build system and test tools are capable of providing. If they do limit what you need to do then we recommend you use Cordova CLI directly, because there are limitations to using a cloud-based build system (e.g., you do lose control over some of these details).

0 Kudos