location

Check if 'Access to my location' is enabled - Android

左心房为你撑大大i 提交于 2019-12-20 09:57:09
问题 I have an android app that uses location. But I noticed that if users disable the 'Access to my location' in Settings > Location access, nothing works anymore. How can I check that it's enabled? In case it's disabled, how to open those settings from my app? Thanks SOLVED : String locationProviders = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if (locationProviders == null || locationProviders.equals("")) { ... startActivity(new Intent(Settings

Determine user location on osm maps

时光总嘲笑我的痴心妄想 提交于 2019-12-20 09:55:49
问题 I am working on an android application that determines user location in osm maps. I am being able to show user location on the map, but if the location change the whole map is reloaded, what’s wrong with that? Also how I can increase the accuracy of the user location? And how can I make a circle that increase and decrease according to the accuracy(as shown in Google one)? code : public class OsmDemoActivity extends Activity implements LocationListener, MapViewConstants { private MapView

Location updates not working indoors as claimed by Fusion Location Provider APIs

对着背影说爱祢 提交于 2019-12-20 09:41:44
问题 Issue: Location updates not working indoors as claimed by Fusion Location Provider APIs. What happened: I tried implementing the latest location API to get location updates using LocationClient in my Android App. My android app works fine with out any issue while I am testing outdoor. But when testing indoors (inside any building), then no location updates are happening. Expected behavior: As per the new APIs, I am expecting to get some estimated location around the building while I am

Javascript/PHP can I get GPS location and send it to me?

旧城冷巷雨未停 提交于 2019-12-20 07:49:24
问题 Ok here's what I want: I need something like a Javascript or PHP script to get a gps location from a visitor, and then secretly send it to me (I won't use this bad, it's for an website that prevents my iPhone from being stolen) I want that if a thief opens the website (which I will webclip, name Safari and give the safari icon) I automatically get his location and he's redirected to google or something else So basically like this: navigator.geolocation.getCurrentPosition(GetLocation);

How to set FromFile location in Powershell?

两盒软妹~` 提交于 2019-12-20 07:17:13
问题 I am preparing a script, which needs to use some images from same folder as the script. The images are to be shown on WinForms GUI. $imgred = [System.Drawing.Image]::FromFile("red.png") When I run the ps1 script manually from the folder just by clicking, it loads images and shows them. Unfortuantely I do not remember exactly how I set up this, but as far as I can, it was just the default program to use for ps1 files. When I run the script from a cmd file (to hide the cmd window), it also

Get Current Location GMaps

混江龙づ霸主 提交于 2019-12-20 06:04:05
问题 i tried a lot of "get current location" for android. But i think most of them are outdated, or i simply dont get it. I DONT want to set a marker.addmarker(params..) i would like to use the blue default dot for my position on Gmaps. Here i've found somthing about that, but for my bad it also aint work. Customize marker of myLocation Google Maps v2 Android So in first line i need, my current Location with a Listener when my Location is updating. Im trying this right now (Testing on a real

How do I use MaxMind's GeoIP database to determine location?

倖福魔咒の 提交于 2019-12-20 05:47:07
问题 So, I was told in my previous question that I can use the databases provided by MaxMind to determine locations. So, I got their databases downloaded from their site. They are csv files and open up in Excel. InetAddress ip = InetAddress.getLocalHost() is how I get the IP of my computer. From there I do String justIP = ip.getHostAddress() My question is: How do I resolve justIP to a city location using the DB I just downloaded ??? I am new to this so a little help will be appreciated. One of

Location is not getting in samsung phone if GPS is disabled

。_饼干妹妹 提交于 2019-12-20 05:15:20
问题 I use samsung phone to get location through LocationManager API, i'm unable to get location if GPS is disabled, through network provider i'm unable to get the location. Here is the code, this works well in HTC & sony even disabling GPS but not in Samsung phone. public Location getLocation() { try { mLocationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE); // getting GPS status isGPSEnabled = mLocationManager .isProviderEnabled(LocationManager.GPS_PROVIDER); //

Android Location Manager Issue

匆匆过客 提交于 2019-12-20 04:53:20
问题 From the following code, I get the current location. Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAltitudeRequired(false); criteria.setBearingRequired(false); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_LOW); String provider = locationManager.getBestProvider(criteria, true); GlobalLocation = locationManager.getLastKnownLocation(provider); locationManager.requestLocationUpdates(provider, 2000, 10, locationListener)

两天撸一个天气应用微信小程序

江枫思渺然 提交于 2019-12-20 04:19:56
这是一个完整的已经线上运行的天气应用小程序, 点击可查看源码 ,可随意 star。也可以扫描下方的小程序码直接体验。 效果图: 说明 鸣谢:pure 天气 APP:首页样式借鉴了 pure天气 APP。如侵删。 数据来源 地理编码、天气数据均来自 百度地图开放平台 。个人开发完全免费,有对应的小程序 sdk,加入即可,但是返回的天气数据较少。 运行前准备 注册微信小程序 ,获取 appid 注册 百度地图开放平台 开发者,创建应用,获取 ak(其他配置自行查看) 在 app.js 中替换 globalData 中的 ak 为自己的 ak Run 利益相关 无 天气数据获取 因为只是一个个人版DEMO(完整版),开发前就决定选择免费的天气数据(个人开发免费),懒得去寻找其他的天气数据,懒得去注册账号,就直接选择了 百度地图开放平台 的天气数据,正好也提供了小程序对应的 sdk,但是可能相比于其他的天气 API,百度返回的数据偏少:当天 pm2.5、当天和未来三天数据、当天生活指数,其他的就没有了。但是对于一款简单的天气应用小程序来说也够了。 地理编码 获取天气数据默认返回当前城市的天气数据,如果要获取其他的城市的天气数据,需要传入经纬度。为了获取其他城市的经纬度,这里使用的地图的地理编码接口,输入城市名,输出经纬度,然后调用获取天气数据 API 即可。 具体实现 该应用只有五个个页面