Please, tell us how to recreate the issue in as much detail as possible.
Hey guys, calling await geolocation.enableLocationRequest(); throws following error: Error: Cannot enable the location service. TypeError: Cannot read property 'Accuracy' of undefined. I tried several things, including the part on nativescript doc (https://docs.nativescript.org/plugins/geolocation.html#known-issues) , which tells you to add googlePlayServicesVersion = "16.+" to the before-plugins.gradle file.
In the end, I dived into the code of the package. I found out, that the Enums import somehow isn't defined.(it also is deprecated, but has nothing to do with that). The Accuracy attribute is not even available in the namespace. I tried it on several PC's and always got the same error (could it be, that I use @nativescript-community/ui-mapbox as well, which uses the users location?). Thanks a lot for helping!
Is there any code involved?
`import * as geolocation from '@nativescript/geolocation';
...
ngOnInit() {
await geolocation.enableLocationRequest();
// console.log(await geolocation.isEnabled());
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
Please, tell us how to recreate the issue in as much detail as possible.
Hey guys, calling
await geolocation.enableLocationRequest();
throws following error:Error: Cannot enable the location service. TypeError: Cannot read property 'Accuracy' of undefined
. I tried several things, including the part on nativescript doc (https://docs.nativescript.org/plugins/geolocation.html#known-issues) , which tells you to addgooglePlayServicesVersion = "16.+"
to thebefore-plugins.gradle
file. In the end, I dived into the code of the package. I found out, that theEnums
import somehow isn't defined.(it also is deprecated, but has nothing to do with that). The Accuracy attribute is not even available in the namespace. I tried it on several PC's and always got the same error (could it be, that I use@nativescript-community/ui-mapbox
as well, which uses the users location?). Thanks a lot for helping!Is there any code involved?
`import * as geolocation from '@nativescript/geolocation'; ... ngOnInit() { await geolocation.enableLocationRequest(); // console.log(await geolocation.isEnabled());
}`