location

Button click does not start Service in Android App Widget

三世轮回 提交于 2019-12-11 01:39:57
问题 I'm having trouble starting a Service to update an AppWidget that I'm creating as an exercise. I'm trying to get the latitude and longitude of spoofed location data from DDMS to display in the widget. The widget uses a service to update the TextView, which may be slightly overkill, but I wanted to follow the template that seems to be common in AppWidgets that do more work (like the Forecast widget or the Wiktionary widget). Right now, I'm not getting any error messages or strange behavior;

Xamarin Forms Android Pie Not Getting Current Location in App Background Sleep Mode

房东的猫 提交于 2019-12-11 00:21:51
问题 I want to get current location, when app went into sleep mode or Background.Currently i am using > Plugin.Geolocator.CrossGeolocator.Current DLL in App OnSleep() , But Its Working Till Android 8.1 but Android Pie Not updating current Location Values.. How to Achieve in Android Pie? Sample Code : protected override async void OnSleep() { var minute = TimeSpan.FromSeconds(30); Device.StartTimer(minute, () => { await Task.Run(async () => { TimeSpan t = TimeSpan.FromSeconds(10); var locator =

Location-aware geocoding on Android (just like Google Maps)

孤人 提交于 2019-12-10 23:16:21
问题 It seems that the search in the Google Maps app is location aware . For example, if I search for "Pitt St" while in Sydney, it finds the right street straight away. Clicking "Did you mean..." brings a list of other "Pitt St" close in nearby suburbs . Is there a way to ge a similar experience in our apps? I tried the standard Geocoder, but a similar search returns "Pitt St, New York" as the first match. Is there a set of options I'm missing? Is there a different API we can use for this? As a

getLastKnownLocation does not work on Samsung Galaxy S3 4.0.4

我只是一个虾纸丫 提交于 2019-12-10 22:29:31
问题 I have some getLastKnowLocation code that has worked for years, but it does not work on the Samsung Galaxy S3 4.0.4. Location location = null; locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); String provider = locationManager.getBestProvider(criteria, true); // The S3 returns null here (even though location is enabled), google maps works. try { location = locationManager.getLastKnownLocation(provider); } catch

windows phone 7 how to navigate to settings menu

瘦欲@ 提交于 2019-12-10 22:26:13
问题 I have a windows phone 7 app that uses GPS to track user position. Now the user can disable this feature through the phone's setting menu. the app handles this disabling fine and gives them a message. This is all pretty standard windows phone stuff. My question is whether I can navigate (inside the app) to the settings menu so that the user can enable phone location services? Ideally I would give them a link or a button that they touch and they are then taken out of the app to the settings

Get zip code from latitude/longitude

自作多情 提交于 2019-12-10 22:19:58
问题 I have a control that allows a user to either enter a zip code or open up google maps in an iframe and click on the map to pick a location. I currently have this all working and the iframe will send the lat/lon from the click event back to the parent. I also have a db table set up with lat/lon fields mapped to zip codes. However, the lat/lon combination will most likely never exactly match the entry I have in the db. So, I'm looking for the best way to match the closest zip code. Because the

How to get Country name by given Postal Code (ZIP) on iOS SDK

我是研究僧i 提交于 2019-12-10 22:09:03
问题 Is it possible to get the country name by giving the postal code of the user? I looked at the Core Location Framework, but it doesn't look to work the other way around by given the Postal Code and finding the Country name. The Core Location framework (CoreLocation.framework) provides location and heading information to apps. For location information, the framework uses the onboard GPS, cell, or Wi-Fi radios to find the user’s current longitude and latitude. I hope there is a class on iOS SDK,

Working with location updates when app is terminated

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 21:44:48
问题 I am working on a project in which i am trying to get location updates in all states, even when app is terminated. I have used all possible solutions but still it's not working in case of termination.For now I want to clear a doubt - I am using startUpdatingLocation() for foreground and background. As we know that startMonitoringSignificantLocationChanges() is the only method that relaunch app in case of any location update. Can we call "startMonitoringSignificantLocationChanges()" in

Location Permissions on Android 5.1

孤街醉人 提交于 2019-12-10 20:44:58
问题 We have built and deployed a location-based shopping app that worked perfectly. That is until we discovered that our app does not work on Android 5.1.1 devices due to a Security Exception thrown. After a little research I discovered that Google has created a new method of asking for permissions at runtime but did not see any clear ways of doing that. Can anyone give clear guidelines/lines of code of requesting permission from the user at runtime. Will the app also have to do this every time

Locations of CSV files in Android

瘦欲@ 提交于 2019-12-10 20:43:03
问题 I'm having trouble reading in from a .CSV file in an android app. Mainly a "FileNotFound" error. Where would be the easiest place to put the file, and what would be the address to it. I have been messing around with a few different places but have had no luck. Can anyone point me in the right direction? 回答1: You'll probably want it on the removable storage (SD card). First you'll want to check if the storage is available, then read/write. The docs have some notes on this: http://developer