location

How can I pull databases off my android onto my desktop?

流过昼夜 提交于 2019-11-29 01:12:46
问题 I'm trying this with my Nexus One. I have the android SDK and have used the command adb pull /data/data/com.myapp.android/databases C:\pulls but all I get is pull: building file list... 0 files pulled. 0 files skipped. Also, it seems no matter how much data I add to the tutorial NotePad app I installed, the data size for the app (as shown in Settings) never exceeds 8KB. How is this possible? Is there some other place where databases are stored? When I use the File Explorer view (that's part

Can't find the class com.google.android.gms.location.LocationClient (android)

旧巷老猫 提交于 2019-11-29 01:04:28
I have download a demo project from http://developer.android.com/training/location/retrieve-current.html , and I think I don't lost any steps; But I can't find which jar file contain the “com.google.android.gms.location.LocationClient.class” file We found all "google-play-services.jar" and "maps.jar", and "android.jar (All versions)" don't contain the "LocationClient.class"? Add to Gradle file (x.y.z - actual version of Google Play Services): compile 'com.google.android.gms:play-services-location:x.y.z' Jeremie Petitjean There is some problem with the last GPS lib. You have to use an older

LocationRequest constructor is marked as internal

故事扮演 提交于 2019-11-29 01:00:27
I'm trying to set up location updates in my Android app using com.google.android.gms:play-services-location:12.0.0 , but I'm getting the following error: LocationRequest constructor is marked as internal and should not be accessed from apps My location updates request looks like this: locationClient.requestLocationUpdates( new LocationRequest() .setInterval(5000) .setFastestInterval(1000) .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY), locationCallback, null ); I have followed the docs and the example , which do it the same way. If I'm not supposed to call new LocationRequest() , then

How can whatsapp know country code upon first run on iphone

早过忘川 提交于 2019-11-29 00:39:53
问题 When I first install whatsapp on iphone, when I open it, the first screen already knows my sim cards location and shows the country code. How does whatsapp know this ? As apple rejects all the apps that use sim card info programmatically. 回答1: in your .h file you need to: #import <CoreTelephony/CTCarrier.h> #import <CoreTelephony/CTTelephonyNetworkInfo.h> And this function will get the country code: -(NSString*)getCountryDialingCode { NSDictionary *dialingCodes = [[NSDictionary alloc

IllegalArgumentException: provider doesn't exisit: null on Maps V1

十年热恋 提交于 2019-11-29 00:39:46
问题 I'm using Google Maps API V1. I have this error : java.lang.IllegalArgumentException: provider doesn't exisit: null This is my code : locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_FINE); String provider = locationManager.getBestProvider(criteria, true); if (provider != null) { startTime = System.currentTimeMillis(); geoLocTimeOutTask = new GeoLocTimeOutTask(); geoLocTimeOutTask

10.Nginx反向代理

六眼飞鱼酱① 提交于 2019-11-29 00:35:11
1. Nginx代理服务基本概述 1.1 什么是代理 代理一词往往并不陌生, 该服务我们常常用到如(代理理财、代理租房、代理收货等等),如下图所示 1.2 没有代理情景 在没有代理模式的情况下,客户端和Nginx服务端,都是客户端直接请求服务端,服务端直接响应客户端。 1.3 企业场景 那么在互联网请求里面,客户端往往无法直接向服务端发起请求,那么就需要用到代理服务,来实现客户端和服务通信,如下图所示 2. Nginx代理服务常见模式 Nginx作为代理服务,按照应用场景模式进行总结,代理分为正向代理、反向代理 2.1 正向代理 正向代理,(内部上网)客户端<—>代理->服务端 2.2 反向代理 反向代理,用于公司集群架构中,客户端->代理<—>服务端 2.3 正向代理与反向代理的区别 1.区别在于形式上服务的”对象”不一样 2.正向代理代理的对象是客户端,为客户端服务 3.反向代理代理的对象是服务端,为服务端服务 3. Nginx代理服务支持协议 Nginx作为代理服务,可支持的代理协议非常的多,具体如下图 3.1 反向代理使用协议 如果将Nginx作为反向代理服务,常常会用到如下几种代理协议,如下图所示 模块总结 反向代理模式与Nginx代理模块总结如表格所示 反向代理模式 Nginx配置模块 http、websocket、https ngx_http_proxy_module

Android LocationListener Switching from GPS to Network

心不动则不痛 提交于 2019-11-29 00:29:50
I have a Service implementing LocationListener listening for both GPS and Network. The application is dependant on a constant location-feed, but it seems when GPS has a hard time getting a locationfix network location doesnt step in. manager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000 * 30,0, LocationReporterService.this); manager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000 * 60 * 2,0, LocationReporterService.this); Questions How do I make sure that I always get a location? How can I make sure that if I dont get a GPS-location, I get a Network-location? Is it a

Nginx学习总结:常用module(二)

倾然丶 夕夏残阳落幕 提交于 2019-11-29 00:05:07
斜体下划线,表示建议采用默认配置,无需显式的配置 一、ngx_core_module 1、accept_mutex 【on | off】 上下文:events 默认为“on”,在worker进程accpet客户端链接时,是否为“互斥”?如果为on,则当有新链接时,worker进程将会依次接收,否则workers将同时“竞争”(当链接的存量较小时,这种竞争会浪费较多的系统资源)。 accept_mutex_delay 【time】:默认值为“500ms”;当accept_mutex开启时,如果一个worker进程正在accept新的链接,那么其他worker如果也需要尝试accept时需要的最大等待时间。 2、include 【file | mask】 上下文:main 无默认值,表示需要加载的“额外”配置文件列表,当nginx同时为多种server代理时(比如图片服务器,应用服务器),为了避免单个conf文件过于繁杂,我们可以将不同的server配置拆分到各自的conf文件中;比如我们将图片服务器的配置单独放在image.conf,将api的放在api.conf,那么nginx.conf再将它们include。 3、multi_accpet 【on | off】 上线文:events 默认值为“off”,如果队列中有多个请求,那么是否允许一个worker批量accept多个链接

How to check for Mock Location in Android Marshmallow?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 23:49:28
How to detect if the location is triggered with Mock Location in Android Marshmallow ? Previously, I used Settings.Secure.ALLOW_MOCK_LOCATION But, in API level 23, this has been deprecated. I want to check if the trigger is with Fake location or original GPS ? Now, what is the alternative to check if Mock Location is enabled or not Android Marshmallow ? If you are using FusedLocationProviderApi and have set mock location using setMockLocation(mGoogleApiClient, fakeLocation); in the callback/pendingIntentCallback the returned Location object contains KEY_MOCK_LOCATION extra, a boolean that

How to get Location (latitude & longitude value) in variable on iOS?

为君一笑 提交于 2019-11-28 23:24:06
I would like to use the location of my app user, more specifically the latitude and longitude value. I need them to use in a variable, so that I can send them with an url... I never worked before withe locations on iOS and Xcode and found nothing matching for my problem on the Internet... So I hope someone can explain it to my with a code sample :) Thx for u help Laurenz from Germany Peter Zhou You can use CoreLocation to get the longitude and latitude. Include framework: Click your project in navigator. Click the plus button under "link binary with libraries" Add Corelocation to your project.