location

Unable to view current coordinates on button click in android studio

回眸只為那壹抹淺笑 提交于 2019-12-08 04:16:13
问题 I am creating an app which will get a user name from DB and print the ID and then on button click it will show the current GPS coordinates . I have implemented it but don't know why its not working. Here is my Manifest file <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS

locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); return null pointer exception

邮差的信 提交于 2019-12-08 04:13:55
问题 Followind code always return null poiner exception for location manager. My GPSTracker class private final Context mContext; // flag for GPS status boolean isGPSEnabled = false; // flag for network status boolean isNetworkEnabled = false; // flag for GPS status boolean canGetLocation = false; Location location; // location double latitude; // latitude double longitude; // longitude // The minimum distance to change Updates in meters private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES =

Network provider stops providing updates

坚强是说给别人听的谎言 提交于 2019-12-08 03:15:28
问题 I have noticed that rarely (every few days), my app stops receiving new location updates. The location listener is registered with both network and GPS providers. The GPS provider is off so any location updates come from the network provider. Every few days or so, I notice the location is old and not updating. From my debug log I can see that the location listener is being registered with location manager but there are just no new locations being found. onLocationChanged() is not called. The

Get Multiple Cell IDs for location using Cellular Towers C# Windows Mobile

假装没事ソ 提交于 2019-12-08 03:02:24
问题 Following Microsoft's documentation on RIL I've been able to implement a code that retrieves Cell ID, LAC, MCC, MNC and Signal Strength. Using these data and http://www.opencellid.org/ I'm able to retrieve latitude and longitude of that cell tower. The problem is that I need to implement some kind of triangulation algorithm to get a more accurate position. But before even thinking in triangulation, I'm going to need more than one tower ID to work with. How can I get them? I tried to create an

iOS: Application missing from Location Services list

微笑、不失礼 提交于 2019-12-08 02:27:18
问题 My application uses iPhone's GPS functionality, and it was working fine previously, as in it prompts user to allow the use of location services and it shows up under Settings > Location Services list. I uninstalled and re-downloaded the app from the app store, but it no longer does either of them. The app was of the same version, and hasn't been updated for a while, but the problem had started recently. The problem has been found in multiple devices (iPhone 3GS, iPhone 4, iPhone 4S) running

php ip location

佐手、 提交于 2019-12-08 01:54:57
问题 I have a simple question. Is it possible to redirect people in my website by the IP location? Example: one person navigates on the site and when go to pay, if the ip location is from Portugal pay by bank transfer, if not pay by paypal? sorry my english. thanks, Pedro Lopes 回答1: In the end, it sounds like you only really care about which billing platform to send them to. It is far easier and more reliable to allow your users to select their country from a list of countries you support. This is

javascript location.href onchange event listener?

流过昼夜 提交于 2019-12-08 01:22:59
问题 I want to show a message whenever you are leaving the page (not an annoying alert, just some html telling you to wait), in thinking about it I'm facing certain difficulties: when the user presses Stop in the browser, cancelling the navigate-away action, I'd like the message to go away. whenever any link is clicked, the message should appear. it shouldn't capture when the clicked link just opens another tab ( ignore _blank target ) that being said, firing the event is pretty simple, with just

WPF Window Location

青春壹個敷衍的年華 提交于 2019-12-08 01:18:25
问题 I'm trying to get a Window to start in the bottom right corner of the primary display (as it will definitely be used on multi-monitor systems). So far, I've got it working, but the window first flashes somewhere in the middle of the screen for a split second, then moves to the correct location. Here's what I've got: public MyWindow() { InitializeComponent(); Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() => { var workingArea = System.Windows.Forms.Screen.PrimaryScreen

php - header location redirect: https to https, http to http

跟風遠走 提交于 2019-12-08 01:16:27
问题 How do I properly use header function, so header("location: http://".$_SERVER['HTTP_HOST']."/?para=abc"); //for http and header("location: https://".$_SERVER['HTTP_HOST']."/?para=abc"); //for https could be written in 1 string if possible? .htaccess file will take care of all http pages to be redirected to https with no problem, but I believe it makes sense to use a proper syntax for http/https pages in header("location:...) , so it is correct for all browsers. 回答1: $protocol='http'; if

FQL query for finding public event

柔情痞子 提交于 2019-12-08 00:47:50
问题 I would like to execute an FQL query for retrieving all the public events in a specific area (using longitude,latitude and maximum distance or simply location name). Do you know if it's possible? Apparently, somebody is able to do it, somehow: http://elmcity.info/fb_events?location=tokyo 回答1: It is possible indeed to receive events using location based "search" To do so you'll need the longitude and latitude coordinates of the location you want to search and a access_token with user_events