[Mobile-sig] Android build changes

David Boddie david at boddie.org.uk
Wed Sep 12 06:31:36 EDT 2018


On Wednesday 12. September 2018 09.35.55 Russell Keith-Magee wrote:

> The threads you’ve linked are dealing with 2 slightly different problems.

Ah, yes. Sorry for conflating the two things. I think I was looking for the
build issue in the Kivy list archives and found the API issue instead.

Just to clarify something:

> b) If you specify a minimum API of 21, and a target of 21, the method foo()
> will exist, and will have the “old” behavior. The app won’t run on *really*
> old devices, but will run on anything supporting API 21 or newer.
> 
> c) If you specify a minimum API of 21, and a target of 23, the method foo()
> will exist, and will have the “new” behavior. The app will run on the same
> devices as case (b)

I'm guessing it will only have the "new" behavior on new devices. Those that
only support API level 21 won't be able to implement the later behavior.

> The Android blog post that you’ve referenced is about what will be allowed
> on the Google Play store; they’re setting limits on what you can upload to
> the Play store based on the *target* API. They’re essentially ensuring that
> the “new” behavior for all their APIs is being used (mostly for security
> reasons), and enforcing that by preventing anyone from (easily)
> distributing an app that uses old (potentially insecure) behaviours.

Yes, I ran into an issue like this recently, but not with the Play store,
just with running an app written to use an API in an old way on a phone with
a newer API. In that case the way you could use the network features had
changed to prevent their use in the GUI thread. So changing the target API
version to a higher number caused the app to raise an exception.

> The references on the BeeWare chat are about Android Studio, the Android
> build system, and the changes to the Android gradle target. That versioning
> is (annoyingly) completely independent of the Android API version
> numbering. Over the last year, the Gradle format has radically changed, and
> the migration path hasn't been obvious. This is something we (BeeWare) have
> been wrestling with for about 6 months, but we haven’t had a lot of luck
> finding people who know both (a) Python and (b) Android who have
> volunteered to help out.

I'm sure I saw something about this in the Kivy list archive, which is why I
went looking in the Beeware Gitter logs. Incidentally, is the Gitter
discussion archived anywhere? It's not a lot of fun scrolling back through
the messages in a web browser.

David


More information about the Mobile-sig mailing list