Hello there, i’m new using IONIC, but i believe to know a couple of things about it, however i can’t get Geolocation to work properly in Android device. Really i can´t understand Ionic Documentation or maybe i dont how to search, im moving from Phonegap where to get Geolocation working properly it’s very very simple, so i think may be i’m making something very very vey bad, if you want to save my life (literaly) please take a look on to this code:
I have even tested calling Geolocation functions from my home.ts file
But same results.
Same results without enableHighAccuracy param
I really don’t what else can i do, or where can i take a look, thank you for your time
EDITED 2017-02-07
This looks like the relevant part of my home.ts file I am calling the api Geolocation from this file instead of calling it in the file app.components.ts
I’ve tried enableHighAccuracy true and false even I’ve tried without the enableHighAccuracy parameter. Same result, no response from the call to Geolocation.getCurrentPosition () there’s is no alert, there’s no error, there’s nothing, it simply does not respond.
Ehm, any more details? Doesn’t it work at all or just look ugly?
Using android, right? Just connect your phone via usb to your computer, enable remote debugging (Chrome DevTools - Chrome for Developers). Then execute “ionic run android -l -c”. ‘-l’ enables live reload on changes and ‘-c’ enables output to the command line of console.log().
Important: Check in windows hardware manager, if the phone is installed properly or if there are any driver issues. Took me a while myself the first time to realize the device simply did not install all required usb drivers when being connected to my PC.
Hi there. It’s not really clear what the issue/question is.
If you need to debug and read your console logs, deploy to your device through usb, open chrome, navigate to chrome://inspect and select your target.
This will give you the same dev tool as your browser, with element, console, and network tabs.
The problem is Geolocation never responds, when i try the app trough Web
Browser in my laptop it works very good, but when i execute the app in a ,
Device Geolocation not work.