You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Bryan Ellis <er...@apache.org> on 2020/11/06 03:32:57 UTC

[DISCUSS] Cordova Plugin Geolocation 4.1.0 Release

This is an updated thread of the previous thread https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7%40%3Cdev.cordova.apache.org%3E <https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7@%3Cdev.cordova.apache.org%3E>

The only exception is that it will prepare for the cordova-plugin-geolocation 4.1.0 release instead.

Re: [DISCUSS] Cordova Plugin Geolocation 4.1.0 Release

Posted by George Henne <gh...@nsbasic.com>.
Looks good to me. I tested it with this in config.xml:

    <plugin name="cordova-plugin-geolocation" source="npm" spec="https://github.com/apache/cordova-plugin-geolocation.git#4.1.0">
      <variable name="GPS_REQUIRED" value="false" />
    </plugin>

After cordova platform add, this appears in AndroidManifest.xml"

    <uses-feature android:name="android.hardware.location.gps" android:required="false" />

Thumbs up!

- George Henne



Re: [DISCUSS] Cordova Plugin Geolocation 4.1.0 Release

Posted by julio cesar sanchez <jc...@gmail.com>.
Variables have always required to uninstall and reinstall to change them.

El lunes, 9 de noviembre de 2020, Bryan Ellis <er...@apache.org> escribió:

> I also agree that this issue is not related to the plugin and should not be
> a blocker for the release.
>
> With little digging into this issue, I want to say it might be an issue in
> Cordova Lib and maybe around munger.
>
> When you add the plugin, and review the contents of this file:
> */cordovaPlugin/platforms/android/android.json,
> y*ou will notice that it contains plugin information which I want to say is
> going to be used for the cordova prepare step.
>
> Example snippet:
>
> "cordova-plugin-geolocation": {
>   "GPS_REQUIRED": "false",
>   "PACKAGE_NAME": "org.apache.cordovaPlugin"
> }
>
> When running cordova prepare, this is not updated either.
>
> More investigation would be required to determine if it is coming from
> this, and also another thread to future discuss this issue and also if it
> is intentional or not.
>
>
>
> On Mon, Nov 9, 2020 at 3:34 PM Norman Breau <no...@nbsolutions.ca> wrote:
>
> > Testing the feature that was added, I observed some odd behaviour.
> >
> > I added the plugin with the --variable GPS_REQUIRED set to false. This
> > works as expected, with the variable recorded in package.json and the
> > AndroidManifest.xml containing the proper flag to signal that gps
> hardware
> > is not required.
> > However, if I change the variable inside package.json from "false" to
> > "true" and rerun prepare or build, the AndroidManifest.xml is not
> updated.
> > The only way I can get AndroidManifest.xml to update properly is by
> > removing the plugin and re-adding it with the updated variable. Is this
> > intentional?
> > Even if this is a bug, I don't think it's a bug inside this plugin so I
> > don't think it's necessary to block the release or anything. Just simply
> > pointing out a potential problem.
> > On Nov 5 2020, at 11:32 pm, Bryan Ellis <er...@apache.org> wrote:
> > >
> > > This is an updated thread of the previous thread
> > https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88
> c241596960c0932c34ca45bd7b7%40%3Cdev.cordova.apache.org%3E
> > <
> > https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88
> c241596960c0932c34ca45bd7b7@%3Cdev.cordova.apache.org%3E
> > >
> > > The only exception is that it will prepare for the
> > cordova-plugin-geolocation 4.1.0 release instead.
>

Re: [DISCUSS] Cordova Plugin Geolocation 4.1.0 Release

Posted by Bryan Ellis <er...@apache.org>.
I also agree that this issue is not related to the plugin and should not be
a blocker for the release.

With little digging into this issue, I want to say it might be an issue in
Cordova Lib and maybe around munger.

When you add the plugin, and review the contents of this file:
*/cordovaPlugin/platforms/android/android.json,
y*ou will notice that it contains plugin information which I want to say is
going to be used for the cordova prepare step.

Example snippet:

"cordova-plugin-geolocation": {
  "GPS_REQUIRED": "false",
  "PACKAGE_NAME": "org.apache.cordovaPlugin"
}

When running cordova prepare, this is not updated either.

More investigation would be required to determine if it is coming from
this, and also another thread to future discuss this issue and also if it
is intentional or not.



On Mon, Nov 9, 2020 at 3:34 PM Norman Breau <no...@nbsolutions.ca> wrote:

> Testing the feature that was added, I observed some odd behaviour.
>
> I added the plugin with the --variable GPS_REQUIRED set to false. This
> works as expected, with the variable recorded in package.json and the
> AndroidManifest.xml containing the proper flag to signal that gps hardware
> is not required.
> However, if I change the variable inside package.json from "false" to
> "true" and rerun prepare or build, the AndroidManifest.xml is not updated.
> The only way I can get AndroidManifest.xml to update properly is by
> removing the plugin and re-adding it with the updated variable. Is this
> intentional?
> Even if this is a bug, I don't think it's a bug inside this plugin so I
> don't think it's necessary to block the release or anything. Just simply
> pointing out a potential problem.
> On Nov 5 2020, at 11:32 pm, Bryan Ellis <er...@apache.org> wrote:
> >
> > This is an updated thread of the previous thread
> https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7%40%3Cdev.cordova.apache.org%3E
> <
> https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7@%3Cdev.cordova.apache.org%3E
> >
> > The only exception is that it will prepare for the
> cordova-plugin-geolocation 4.1.0 release instead.

Re: [DISCUSS] Cordova Plugin Geolocation 4.1.0 Release

Posted by Norman Breau <no...@nbsolutions.ca>.
Testing the feature that was added, I observed some odd behaviour.

I added the plugin with the --variable GPS_REQUIRED set to false. This works as expected, with the variable recorded in package.json and the AndroidManifest.xml containing the proper flag to signal that gps hardware is not required.
However, if I change the variable inside package.json from "false" to "true" and rerun prepare or build, the AndroidManifest.xml is not updated. The only way I can get AndroidManifest.xml to update properly is by removing the plugin and re-adding it with the updated variable. Is this intentional?
Even if this is a bug, I don't think it's a bug inside this plugin so I don't think it's necessary to block the release or anything. Just simply pointing out a potential problem.
On Nov 5 2020, at 11:32 pm, Bryan Ellis <er...@apache.org> wrote:
>
> This is an updated thread of the previous thread https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7%40%3Cdev.cordova.apache.org%3E <https://lists.apache.org/thread.html/r431cbb7ae688285280e2cb0a92f88c241596960c0932c34ca45bd7b7@%3Cdev.cordova.apache.org%3E>
> The only exception is that it will prepare for the cordova-plugin-geolocation 4.1.0 release instead.