cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: [DISCUSS] Core Plugins and Android API 23
Date Thu, 07 Jan 2016 00:44:37 GMT
I'm very against this idea because we've been burned by using reflection in
the past.  I also feel that this allows developers be terrible and to stick
with older, more insecure versions of Cordova, which is the main reason I'm
against it.  I don't think that requiring API level 23 is a problem.
There's nothing saying that they can't use prior versions of plugins with
their applications, but we shouldn't be using reflection because these
users are too lazy to update their Android environment or get their plugins
to work.  I'm almost certain that this will burn us in the future when some
users wants some API that we removed for a good reason.

Seriously, if we allow this to happen, what was the point of even
incrementing the version to Android 5.0? Also, do we have to basically
write the apps for our users as well at this point, because they're unable
to deal with change?


On Wed, Jan 6, 2016 at 4:08 PM, Richard Knoll <riknoll@microsoft.com> wrote:

> Hey all,
>
> As has been very thoroughly discussed at this point, the cordova-android
> 5.0.0 update included breaking changes for plugins in response to the new
> permission model that Android Marshmallow introduced. Unfortunately, this
> means that our plugins that took advantage of the new permission APIs are
> no longer able to build on Cordova platforms before cordova-android 5.0.0.
> Really, this update only came down to two new methods in CordovaInterface:
> one for requesting permissions and one for checking them. Since this is
> such a minor API change, it is trivial for us to modify the core plugins
> that require permissions to use reflection and allow projects that are
> still using the earlier Android APIs to keep using them. I have done so for
> the camera plugin as an example [1]. All it took was writing a helper class
> for permissions that I made general enough to be easily included in the
> other core plugins.
>
> This change gives users who are not ready to embrace Android API 23 some
> more time before they are forced to update (e.g. if they are still using
> some other plugins that have yet to be updated). It also helps us reduce
> some of the current plugin versioning woes we're having. Anyone using
> Cordova 5.x stands to benefit, since this can prevent some confusion and
> frustration caused by broken builds when their cli fetches the latest
> plugins. In my opinion, the cost of copying a helper class is worth that
> potential payoff. What do others think?
>
> I did a little testing with my modified camera plugin and cordova-android
> 3.7.1 (which I arbitrarily chose) and it built/seemed to work fine. If
> people support this idea, I can do a bit more testing and make PRs for the
> other plugins.
>
> For the record, the affected plugins are as follows:
>     cordova-plugin-camera
>     cordova-plugin-contacts
>     cordova-plugin-file
>     cordova-plugin-geolocation
>     cordova-plugin-media
>
> Thanks,
> Richard
> [1]
> https://github.com/apache/cordova-plugin-camera/compare/master...riknoll:reflection?expand=1
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message