location

Mapbox - Can I use the locationlistener without Mapbox map

江枫思渺然 提交于 2019-12-12 04:58:16
问题 I know the way to use locationListener and triggering the GPS is done like that: mapboxMap.setMyLocationEnabled(true); I want to open the locationListener at app start, but I don't want to use the map in the startActivity . Just using the locationListener without map. How can I do with Mapbox ? 回答1: You can use an instance of LocationEngine to acquire location updates without showing the map. final LocationEngine locationEngine = new LostLocationEngine(this); locationEngine.setPriority

Javascript to read other files in hard drive?

爱⌒轻易说出口 提交于 2019-12-12 04:43:00
问题 I am writing a front end program to load when my hard drive is plugged in. The file is called Boot.htm, so to get this name I use var url = window.location.pathname; var filename = url.substring(url.lastIndexOf('/')+1); alert(filename); Can I get the names of other files in the same place (root of hard drive), dynamically using just Javascript? 来源: https://stackoverflow.com/questions/25713218/javascript-to-read-other-files-in-hard-drive

PHP - get data from database compare it to variable and sort by less value

允我心安 提交于 2019-12-12 04:37:36
问题 Script should: Take latitude and logitude from database of each cinema with while() Compare to location of a user Get the output in kilometers Show all of them based on less kilometers Everything is solved on the script down below, only number 4 is not implemented. I have no idea how to compare every item of while() loop and show everything in the ascending order. <?php $sql = "SELECT DISTINCT * FROM cinemas WHERE city='$city'"; $result = $conn->query($sql); if ($result->num_rows > 0) { //

How to deal with background modes in apple review

早过忘川 提交于 2019-12-12 04:13:45
问题 I have upload my app to itunes yesterday and i receive a mail from the apple that is: From Apple 2. 5 Performance: Software Requirements Guideline 2.5.4 - Performance - Software Requirements We noticed that your app declares support for location in the UIBackgroundModes key in your Info.plist file but does not have any features that require persistent location. Specifically, your app uses location background mode for the sole purpose of tracking employees, which is not appropriate on the App

2 Phones closeby position tracking without GPS

北城以北 提交于 2019-12-12 03:54:50
问题 Is there any way of getting any location data between two closeby devices (distance, direction etc.) using any of the phone capabilities without internet or GPS? If I have two phones that are in a building. Can they find each other without GPS? 回答1: One of the most important capabilities that smartphones now have is knowing where they are. More than desktops, laptops, personal navigation devices or even tablets, which are harder to take with you, a smartphone can combine its location with

PHP Header Location: ../location vs $_SERVER[DOCUMENT_ROOT]/location

本小妞迷上赌 提交于 2019-12-12 03:39:49
问题 So, I made a simple PHP login, but when I tried to redirect like this: $path = $_SERVER["DOCUMENT_ROOT"]; header("Location: $path/admin/index.php"); it seemed like it did nothing, but after I refreshed the page I was logged in. After I changed my code to this: header("Location: ../admin/index.php"); it works. Could someone please explain this to me? Ps. sorry for my bad english 回答1: The header is sent to the browser, so it is not an internal server maneuver. And with it not being an internal

Detecting Mock Location Not Working (Android)

孤人 提交于 2019-12-12 03:39:09
问题 I'm trying to set some protection against people using mock locations to manipulate my app. I realise that it's impossible to prevent 100%... I'm just trying to do what I can. The app uses Google location services (part of play services) in its main activity. The onLocationChanged() method is: public void onLocationChanged(Location location) { this.mCurrentLocation = location; if (Build.VERSION.SDK_INT > 17 && mCurrentLocation.isFromMockProvider()) { Log.i(TAG, "QQ Location is MOCK"); // TODO

Android - How can I calculate the cumulative distance with GPS

我是研究僧i 提交于 2019-12-12 03:34:09
问题 How can I calculate the cumulative distance travelled using the Android GPS? I'm using Android Location services to listen to the location change events but simply finding the distanceTo from the last point to the new point and adding it to a running total tells me I've travelled a distance when I'm stationery. public void onLocationChanged(Location newLocation) { if (lastLocation != null)) { distanceTravelled = distanceTravelled + lastLocation.distanceTo(newLocation); Toast.makeText(this,

Facebook Android SDK 4.0+ user_location?

梦想与她 提交于 2019-12-12 03:25:27
问题 I'm trying hard to get User's country but I'm not able to get it. Not able to understand what exactly is wrong here ? I'm referring this documentation. This is what I have tried so far - public interface IFacebokLoginConstants extends ILoginConstants { String KEY_FIRST_NAME = "first_name"; String KEY_LAST_NAME = "last_name"; String KEY_EMAIL = "email"; String KEY_NAME = "name"; String KEY_LOCATION = "location{location}"; String[] READ_PERMISSIONS = {"public_profile", "email", "user_friends",

Google map and passive provider

耗尽温柔 提交于 2019-12-12 03:16:17
问题 I'm working with passive provider, with this code. Intent intent = new Intent(PASSIVE_ACTION); PendingIntent pi = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE); mLocationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, 0, 0, pi); and I define broadcast receiver in AndroidManifest.xml <receiver android:name="passiveLocationReceiver" android:enabled="true" > <intent-filter>