-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add required=false to the uses-feature #86
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
You can add this line to your
With this content.
Then it will work fine and you will have no more dependencies 👍 But yes your pull request should be merged as soon as possible 👍 |
@patrickbussmann the workaround with the hook will create duplicate uses line in AndroidManifest.xml if you have another plugin declaring the same uses with required false. |
@patrickbussmann Any news on this? As of now I have to manually change the plugin's file |
Sync fork
Hi, this somehow should be and option in plugin. For now you could add this line to
It will work only for the first time, unfortunately. Every next run you need to remove duplicated key from |
@precz We use the cordova-custom-config plugin without issue:
|
Hi, do you have any news on this ? I have the same problem with my app and could not figure out why some customers weren't able to install it until I saw this. |
Noone in here really explained what exactly the problem is that this change solves - could someone please explain when this is useful and why? How does the plugin work without GPS being present? |
In Android Manifest, if the app is defined to use the GPS feature, and it has
https://developer.android.com/guide/topics/manifest/uses-feature-element
|
Ok, so this change would let those apps include the plugin, but of course still not (in any useful way) use it - that would then have to be handled by the developer manually. Correct? What could be disadvantages of allowing this? |
Correct. When a feature is marked as required. It signals that the app cannot function without that feature. When the feature is marked as not required, it says the app will use the feature, if available on the device. |
I personally wouldn't hard code true or false for this value. This should be a configurable option based on the developers requirements. In my opinion, the default value for this configuration should be If hard-coded |
I've created a new PR #171 with an ANDROID_GPS_REQUIRED parameter, so the requirement (true/false) can be set when installing the plugin. Please endorse the PR so it gets merged soon, thanks. Tested with [email protected] and [email protected]. |
Actually this is not completely correct, there are other locationing methods such as network-based, which might be less precise but still often sufficient for most apps, or at least better than nothing. |
Platforms affected
Android
What does this PR do?
Modifies plugin.xml to allow installation of applications using this plugin on devices without GPS
What testing has been done on this change?
Complete test
Checklist