Error 2 The Last Location Provider Was Disabled
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up phonegap The last location provider was disabled up vote 2 down vote favorite 1 i have this code // Wait for Cordova to load // document.addEventListener("deviceready", onDeviceReady, false); // Cordova is ready // function onDeviceReady() { $(window).ready(function(){ navigator.geolocation.getCurrentPosition(onSuccess, onError, {enableHighAccuracy:true, timeout: 5000}); }); } try test this crap on Android 4.1 (Emulator) but allways get error "The last location provider was disabled"/ enableHighAccuracy:true - you see in code 'Enable Location' - in browser settings is checked all uses-permission in manifest.xml all geolocation settings in system settings is checked try on real android 4.1 device, it is also give error. How this can be? javascript html5 cordova geolocation share|improve this question asked Apr 9 '13 at 21:23 CrazyPHP 43212 1 Did you try removing the $(window).ready event? its not required after deviceready event. –Whizkid747 Apr 9 '13 at 21:48 i try all variants, and all tips that i can find on stackoverflow about this error. –CrazyPHP Apr 9 '13 at 22:13 i need fresh help! pleeese!!! –CrazyPHP Apr 9 '13 at 22:50 What version of PhoneGap are you using? –Whizkid747 Apr 10 '13 at 13:56 I'm pretty sure the geolocation functionality piece may be broken in the emulator. The old 'enableHighAccuracy' trick doesn't seem to work anymore. Perhaps if you telnet into the emulator to set the location: developer.android.com/tools/devices/emulator.html#geo –Simon MacDonald Apr 10 '13 at 15:49 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote I figured this out: I needed to go into the setting of my mobile browser and check 'Enable Location' Menu--->Settings---->Location & Security And then check Use Wireless Network. share|improve this answer answered Jul 17 '13 at 8:36 Swapnil Dalvi 471416 Hey, i do this, the error was fixed, but the map don't show! do u know what can be? @Swapnill Dalvi –Furlan Aug 8 '14 at 13:58 add a comment| Your Answer
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. http://stackoverflow.com/questions/15912815/phonegap-the-last-location-provider-was-disabled Join them; it only takes a minute: Sign up AVD manager throws 'the last location provider was disabled' error up vote 1 down vote favorite 3 I am trying to create a HTML5 page that will catch the geolocation, but I'm getting an error on AVD manager. It throws 'the last location provider was disabled' error. i've heard http://stackoverflow.com/questions/9494356/avd-manager-throws-the-last-location-provider-was-disabled-error that could go into the setting of the mobile browser and check 'Enable Location' to solve this problem for a real device. well i do not know how to config the settings for a avd job. could anyone give me some guide please? Here's my source code: document.addEventListener("deviceready", onDeviceReady, false); // PhoneGap is ready // function onDeviceReady() { alert('xxx'); navigator.geolocation.getCurrentPosition(onSuccess, onError); } // onSuccess Geolocation // function onSuccess(position) { alert('xieiei'); var element = document.getElementById('geolocation'); element.innerHTML = 'Latitude: ' + position.coords.latitude + '
' + 'Longitude: ' + position.coords.longitude + '
'; } // onError Callback receives a PositionError object // function onError(error) { alert('ddd'); alert('code: ' + error.code + '\n' + 'message: ' + error.message + '\n'); } android mobile cordova geolocation share|improve this question edited Feb 29 '12 at 6:23 Veraticus 12.9k21935 asked Feb 29 '12 at 6:10 Lion 2427 add a comment| 2 Answers 2 active oldest votes up vote 6 down vote accepted Go to Menu--->Settings---->Location & Security And then check Use Wireless Network. share|improve this answer answered Feb 29 '12
latest technologies and solutions to the most typical problems. Monday, 29 April 2013 Android Phonegap,The last location provider was disabled http://aspnetworks.blogspot.com/2013/04/android-phonegapthe-last-location.html Hi All, I was creating a location based app on android Phonegap http://www.w3dev.cn/article/20150617/geolocation-the-last-location-provider-was-disabled.aspx using the navigation code, The code was fine as mentioned in Phonegap documentation and was working on my Android phone, But when i tested the app on another android phone (HTC one) i got the error message "The last location provider was disabled". I managed to error 2 solve the problem, Here is the step by step process Step 1. Go to Settings > Location Step 2. You need to apply the options a. Google's location services. b. GPS Satellite Step 3. When i tried to run my app after this it was still giving me the same error, But you need to restart the error 2 the phone. This is very important as the settings require the phone to be restarted. When i restarted the app started working fine and i was able to get the location. Thanks Ritesh Posted by Ritesh Tandon at 00:35 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest No comments: Post a Comment Comments are welcome, Please join me on my Linked In account http://in.linkedin.com/pub/ritesh-tandon/21/644/33b Newer Post Older Post Home Subscribe to: Post Comments (Atom) Exciting Deals Analytics Followers Blog Archive ► 2016 (3) ► July (1) ► April (2) ► 2015 (8) ► December (1) ► September (1) ► June (1) ► April (3) ► February (2) ► 2014 (22) ► December (1) ► November (4) ► August (1) ► July (4) ► May (2) ► April (2) ► March (3) ► February (2) ► January (3) ▼ 2013 (25) ► September (3) ► August (5) ► July (6) ► June (4) ► May (3) ▼ April (1) Android Phonegap,The last location provider was di... ► March (1) ► February (1) `
> Web前端开发 > Web前端开发框架 > phonegap/cordova geolocation the last location provider was disabled phonegap cordova调用getCurrentPosition/watchCurrentPostion时,执行error回调,错误如下 code:2 message:the last location provider was disabled 如果确认你已经配置过AndroidManifest.xml添加了下面的允许访问位置信息