android怎么获取用户所在地 csdn

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android怎么获取用户所在地 csdn相关的知识,希望对你有一定的参考价值。

三种方式进行定位,获取用户位置,分别是基于基站定位, 网络定位,GPS定位。

1.基站定位(passive):这是基于网络基站进行定位的,定位的精确度在几十米到几千米不等,在城市中基站覆盖率比较高,推荐使用基站定位,如果是在郊区,基站相距较远,基站的覆盖没有城里好,定位的误差比较大。如果在郊区不推荐使用基站定位。

2.网络定位:wifi定位,网络定位

3.GPS定位:与卫星进行通信。手机中嵌入了GPS模块(精简版的A-GPS),通过A-GPS搜索卫星, 获取经纬度。使用GPS的弊端是:必须站在空旷的地方,头顶对着天空,如果云层厚了,也会受到一定的影响。精确度:10-50米

扩展知识:

使用android是定位必备的权限:
< uses-permission android:name= " android.permission.ACCESS_FINE_LOCATION " />      //精确定位
<uses-permission android:name= "android.permission.ACCESS_MOCK_LOCATION" />      //模拟器
<uses-permission android:name= "android.permission.ACCESS_COARSE_LOCATION" />   //粗糙定位
 
//获取定位管理对象
LocationManager  lm=(LocationManager)getSystemService(LOCATION_SERVICE);
String[] names=lm.getAllProviders();//获取所有的位置提供者,一般三种

Criteria  criteria=new Criteria();//查询条件,如果设置了海拔,则定位方式只能是GPS;
criteria.setCostAllowed(true);//是否产生开销,比如流量费
String provider=lm.getBaseProvider(criteria,true)//获取最好的位置提供者,第二个参数为true,表示只获取那些被打开的位置提供者

lm.requestLocationUpdates(provier,0,0,new LocationListener());//获取位置。第二个参数表示每隔多少时间返回一次数据,第三个参数表示被定位的物体移动每次多少米返回一次数据。

private class MyLocationListener implements LocationListener 
            @Override
            public void onStatusChanged(String provider, int status, Bundle extras) 

           

            @Override
            public void onProviderEnabled(String provider) 

           

            @Override
         


            @Override
            public void onLocationChanged(Location location) 
                 System. out.println( "服务中位置监听发送了变化了" );
                  float accuracy = location.getAccuracy(); // 精确度
                  double altitude = location.getAltitude(); // 海拔
                  double latitude = location.getLatitude(); // 纬度
                  double longitude = location.getLongitude(); // 经度
                 String locationInfo = "jingdu:" + longitude + ",weidu:" + latitude + ",haiba:" + altitude + ",jingquedu:" + accuracy;
                 Editor edit = sp.edit();
                 edit.putString( "location", locationInfo);
                 edit.commit();
           
        public void onProviderDisabled(String provider) 

           
参考技术A 在很多生活类工具应用中都会包含用户位置信息,这样更方便的为用户服务。 经常我们使用三种方式进行定位,获取用户位置,分别是基于基站定位, 网络定位,GPS定位。

一:基站定位(passive):这是基于网络基站进行定位的,定位的精确度在几十米到几千米不等,在城市中基站覆盖率比较高,推荐使用基站定位,如果是在郊区,基站相距较远,基站的覆盖没有城里好,定位的误差比较大。如果在郊区不推荐使用基站定位。

二:网络定位:wifi定位,网络定位
运营商下放IP地址。比如彩虹QQ。
google纵横(统计一个非常大的IP和地址映射关系)
动态IP(IP池中随机获取一个IP地址,每次联网都会去池中获取一个随机的IP ,得到的是一个大体的地址),比如新浪微博。天气定位

方式三:GPS定位
与卫星进行通信。
手机中嵌入了GPS模块(精简版的A-GPS),通过A-GPS搜索卫星, 获取经纬度。
使用GPS的弊端是:必须站在空旷的地方,头顶对着天空,如果云层厚了,也会受到一定的影响。
精确度:10-50米
-------------------------------------------------------------------------------------------
使用Android是定位必备的权限:
< uses-permission android:name= " android.permission.ACCESS_FINE_LOCATION " /> //精确定位
<uses-permission android:name= "android.permission.ACCESS_MOCK_LOCATION" /> //模拟器
<uses-permission android:name= "android.permission.ACCESS_COARSE_LOCATION" /> //粗糙定位

//获取定位管理对象
LocationManager lm=(LocationManager)getSystemService(LOCATION_SERVICE);
String[] names=lm.getAllProviders();//获取所有的位置提供者,一般三种

Criteria criteria=new Criteria();//查询条件,如果设置了海拔,则定位方式只能是GPS;
criteria.setCostAllowed(true);//是否产生开销,比如流量费
String provider=lm.getBaseProvider(criteria,true)//获取最好的位置提供者,第二个参数为true,表示只获取那些被打开的位置提供者

lm.requestLocationUpdates(provier,0,0,new LocationListener());//获取位置。第二个参数表示每隔多少时间返回一次数据,第三个参数表示被定位的物体移动每次多少米返回一次数据。

private class MyLocationListener implements LocationListener
@Override
public void onStatusChanged(String provider, int status, Bundle extras)



@Override
public void onProviderEnabled(String provider)



@Override
public void onProviderDisabled(String provider)



@Override
public void onLocationChanged(Location location)
System. out.println( "服务中位置监听发送了变化了" );
float accuracy = location.getAccuracy(); // 精确度
double altitude = location.getAltitude(); // 海拔
double latitude = location.getLatitude(); // 纬度
double longitude = location.getLongitude(); // 经度
String locationInfo = "jingdu:" + longitude + ",weidu:" + latitude + ",haiba:" + altitude + ",jingquedu:" + accuracy;
Editor edit = sp.edit();
edit.putString( "location", locationInfo);
edit.commit();

参考技术B 最近在做一个互联网项目,不可避免和其他互联网项目一样,需要各种类似的功能。其中一个就是通过用户访问网站的IP地址显示当前用户所在地。在没有查阅资料之前,我第一个想到的是应该有这样的RESTFUL服务,可能会有免费的,也有可能会是收费的。后来查阅了相关资料和咨询了客服人员发现了一款相当不错的库:GEOIP。

首先来个Java 版本:

[java]
import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class OmniReader
public static void main(String[] args) throws Exception
String license_key = "YOUR_LICENSE_KEY";
String ip_address = "24.24.24.24";

String url_str = "http。//geoip。maxmind。com/e?l=" + license_key + "&i=" + ip_address;

URL url = new URL(url_str);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inLine;

while ((inLine = in.readLine()) != null)
// Alternatively use a CSV parser here.
Pattern p = Pattern.compile("\"([^\"]*)\"|(?<=,|^)([^,]*)(?:,|$)");
Matcher m = p.matcher(inLine);

ArrayList fields = new ArrayList();
String f;
while (m.find())
f = m.group(1);
if (f!=null)
fields.add(f);

else
fields.add(m.group(2));



String countrycode = fields.get(0);
String countryname = fields.get(1);
String regioncode = fields.get(2);
String regionname = fields.get(3);
String city = fields.get(4);
String lat = fields.get(5);
String lon = fields.get(6);
String metrocode = fields.get(7);
String areacode = fields.get(8);
String timezone = fields.get(9);
String continent = fields.get(10);
String postalcode = fields.get(11);
String isp = fields.get(12);
String org = fields.get(13);
String domain = fields.get(14);
String asnum = fields.get(15);
String netspeed = fields.get(16);
String usertype = fields.get(17);
String accuracyradius = fields.get(18);
String countryconf = fields.get(19);
String cityconf = fields.get(20);
String regionconf = fields.get(21);
String postalconf = fields.get(22);
String error = fields.get(23);


in.close();


import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class OmniReader
public static void main(String[] args) throws Exception
String license_key = "YOUR_LICENSE_KEY";
String ip_address = "24.24.24.24";
String url_str = "http。//geoip。maxmind。com/e?l=" + license_key + "&i=" + ip_address;
URL url = new URL(url_str);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inLine;

while ((inLine = in.readLine()) != null)
// Alternatively use a CSV parser here.
Pattern p = Pattern.compile("\"([^\"]*)\"|(?<=,|^)([^,]*)(?:,|$)");
Matcher m = p.matcher(inLine);
ArrayList fields = new ArrayList();
String f;
while (m.find())
f = m.group(1);
if (f!=null)
fields.add(f);

else
fields.add(m.group(2));



String countrycode = fields.get(0);
String countryname = fields.get(1);
String regioncode = fields.get(2);
String regionname = fields.get(3);
String city = fields.get(4);
String lat = fields.get(5);
String lon = fields.get(6);
String metrocode = fields.get(7);
String areacode = fields.get(8);
String timezone = fields.get(9);
String continent = fields.get(10);
String postalcode = fields.get(11);
String isp = fields.get(12);
String org = fields.get(13);
String domain = fields.get(14);
String asnum = fields.get(15);
String netspeed = fields.get(16);
String usertype = fields.get(17);
String accuracyradius = fields.get(18);
String countryconf = fields.get(19);
String cityconf = fields.get(20);
String regionconf = fields.get(21);
String postalconf = fields.get(22);
String error = fields.get(23);

in.close();


C#版本:

[csharp]
private string GetMaxMindOmniData(string IP)
System.Uri objUrl = new System.Uri("http。//geoip。maxmind。com/e?l=YOUR_LICENSE_KEY&i=" + IP);
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
System.IO.StreamReader sReader;
string strReturn = string.Empty;

try

objWebReq = System.Net.WebRequest.Create(objUrl);
objResp = objWebReq.GetResponse();

sReader = new System.IO.StreamReader(objResp.GetResponseStream());
strReturn = sReader.ReadToEnd();

sReader.Close();
objResp.Close();

catch (Exception ex)


finally

objWebReq = null;


return strReturn;

private string GetMaxMindOmniData(string IP)
System.Uri objUrl = new System.Uri("http。//geoip。maxmind。com/e?l=YOUR_LICENSE_KEY&i=" + IP);
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
System.IO.StreamReader sReader;
string strReturn = string.Empty;
try

objWebReq = System.Net.WebRequest.Create(objUrl);
objResp = objWebReq.GetResponse();
sReader = new System.IO.StreamReader(objResp.GetResponseStream());
strReturn = sReader.ReadToEnd();
sReader.Close();
objResp.Close();

catch (Exception ex)


finally

objWebReq = null;

return strReturn;

Ruby版本:

[ruby]
#!/usr/bin/env ruby

require 'csv'
require 'net/http'
require 'open-uri'
require 'optparse'
require 'uri'

fields = [:country_code,
:country_name,
:region_code,
:region_name,
:city_name,
:latitude,
:longitude,
:metro_code,
:area_code,
:time_zone,
:continent_code,
:postal_code,
:isp_name,
:organization_name,
:domain,
:as_number,
:netspeed,
:user_type,
:accuracy_radius,
:country_confidence,
:city_confidence,
:region_confidence,
:postal_confidence,
:error]

options = :license => "YOUR_LICENSE_KEY", :ip => "24.24.24.24"
OptionParser.new |opts|
opts.banner = "Usage: omni-geoip-ws.rb [options]"

opts.on("-l", "--license LICENSE", "MaxMind license key") do |l|
options[:license] = l
end

opts.on("-i", "--ip IPADDRESS", "IP address to look up") do |i|
options[:ip] = i
end
.parse!

uri = URI::HTTP.build(:scheme => 'http',
:host => 'geoip.maxmind.com',
:path => '/e',
:query => URI.encode_www_form(:l => options[:license],
:i => options[:ip]))

response = Net::HTTP.get_response(uri)

unless response.is_a?(Net::HTTPSuccess)
abort "Request failed with status #response.code"
end

omni = Hash[fields.zip(response.body.encode('utf-8', 'iso-8859-1').parse_csv)]

if omni[:error]
abort "MaxMind returned an error code for the request: #omni[:error]"
else
puts
puts "MaxMind Omni data for #options[:ip]";
puts
omni.each |key, val| printf " %-20s %s\n", key, val
puts
end
#!/usr/bin/env ruby
require 'csv'
require 'net/http'
require 'open-uri'
require 'optparse'
require 'uri'
fields = [:country_code,
:country_name,
:region_code,
:region_name,
:city_name,
:latitude,
:longitude,
:metro_code,
:area_code,
:time_zone,
:continent_code,
:postal_code,
:isp_name,
:organization_name,
:domain,
:as_number,
:netspeed,
:user_type,
:accuracy_radius,
:country_confidence,
:city_confidence,
:region_confidence,
:postal_confidence,
:error]
options = :license => "YOUR_LICENSE_KEY", :ip => "24.24.24.24"
OptionParser.new |opts|
opts.banner = "Usage: omni-geoip-ws.rb [options]"
opts.on("-l", "--license LICENSE", "MaxMind license key") do |l|
options[:license] = l
end
opts.on("-i", "--ip IPADDRESS", "IP address to look up") do |i|
options[:ip] = i
end
.parse!
uri = URI::HTTP.build(:scheme => 'http',
:host => 'geoip.maxmind.com',
:path => '/e',
:query => URI.encode_www_form(:l => options[:license],
:i => options[:ip]))
response = Net::HTTP.get_response(uri)
unless response.is_a?(Net::HTTPSuccess)
abort "Request failed with status #response.code"
end
omni = Hash[fields.zip(response.body.encode('utf-8', 'iso-8859-1').parse_csv)]
if omni[:error]
abort "MaxMind returned an error code for the request: #omni[:error]"
else
puts
puts "MaxMind Omni data for #options[:ip]";
puts
omni.each |key, val| printf " %-20s %s\n", key, val
puts
end
参考技术C 最近在做一个互联网项目,不可避免和其他互联网项目一样,需要各种类似的功能。其中一个就是通过用户访问网站的IP地址显示当前用户所在地。在没有查阅资料之前,我第一个想到的是应该有这样的RESTFUL服务,可能会有免费的,也有可能会是收费的。后来查阅了相关资料和咨询了客服人员发现了一款相当不错的库:GEOIP。

首先来个Java 版本:

[java]
import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class OmniReader
public static void main(String[] args) throws Exception
String license_key = "YOUR_LICENSE_KEY";
String ip_address = "24.24.24.24";

String url_str = "http。//geoip。maxmind。com/e?l=" + license_key + "&i=" + ip_address;

URL url = new URL(url_str);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inLine;

while ((inLine = in.readLine()) != null)
// Alternatively use a CSV parser here.
Pattern p = Pattern.compile("\"([^\"]*)\"|(?<=,|^)([^,]*)(?:,|$)");
Matcher m = p.matcher(inLine);

ArrayList fields = new ArrayList();
String f;
while (m.find())
f = m.group(1);
if (f!=null)
fields.add(f);

else
fields.add(m.group(2));



String countrycode = fields.get(0);
String countryname = fields.get(1);
String regioncode = fields.get(2);
String regionname = fields.get(3);
String city = fields.get(4);
String lat = fields.get(5);
String lon = fields.get(6);
String metrocode = fields.get(7);
String areacode = fields.get(8);
String timezone = fields.get(9);
String continent = fields.get(10);
String postalcode = fields.get(11);
String isp = fields.get(12);
String org = fields.get(13);
String domain = fields.get(14);
String asnum = fields.get(15);
String netspeed = fields.get(16);
String usertype = fields.get(17);
String accuracyradius = fields.get(18);
String countryconf = fields.get(19);
String cityconf = fields.get(20);
String regionconf = fields.get(21);
String postalconf = fields.get(22);
String error = fields.get(23);


in.close();


import java.net.MalformedURLException;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class OmniReader
public static void main(String[] args) throws Exception
String license_key = "YOUR_LICENSE_KEY";
String ip_address = "24.24.24.24";
String url_str = "http。//geoip。maxmind。com/e?l=" + license_key + "&i=" + ip_address;
URL url = new URL(url_str);
BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
String inLine;

while ((inLine = in.readLine()) != null)
// Alternatively use a CSV parser here.
Pattern p = Pattern.compile("\"([^\"]*)\"|(?<=,|^)([^,]*)(?:,|$)");
Matcher m = p.matcher(inLine);
ArrayList fields = new ArrayList();
String f;
while (m.find())
f = m.group(1);
if (f!=null)
fields.add(f);

else
fields.add(m.group(2));



String countrycode = fields.get(0);
String countryname = fields.get(1);
String regioncode = fields.get(2);
String regionname = fields.get(3);
String city = fields.get(4);
String lat = fields.get(5);
String lon = fields.get(6);
String metrocode = fields.get(7);
String areacode = fields.get(8);
String timezone = fields.get(9);
String continent = fields.get(10);
String postalcode = fields.get(11);
String isp = fields.get(12);
String org = fields.get(13);
String domain = fields.get(14);
String asnum = fields.get(15);
String netspeed = fields.get(16);
String usertype = fields.get(17);
String accuracyradius = fields.get(18);
String countryconf = fields.get(19);
String cityconf = fields.get(20);
String regionconf = fields.get(21);
String postalconf = fields.get(22);
String error = fields.get(23);

in.close();


C#版本:

[csharp]
private string GetMaxMindOmniData(string IP)
System.Uri objUrl = new System.Uri("http。//geoip。maxmind。com/e?l=YOUR_LICENSE_KEY&i=" + IP);
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
System.IO.StreamReader sReader;
string strReturn = string.Empty;

try

objWebReq = System.Net.WebRequest.Create(objUrl);
objResp = objWebReq.GetResponse();

sReader = new System.IO.StreamReader(objResp.GetResponseStream());
strReturn = sReader.ReadToEnd();

sReader.Close();
objResp.Close();

catch (Exception ex)


finally

objWebReq = null;


return strReturn;

private string GetMaxMindOmniData(string IP)
System.Uri objUrl = new System.Uri("http。//geoip。maxmind。com/e?l=YOUR_LICENSE_KEY&i=" + IP);
System.Net.WebRequest objWebReq;
System.Net.WebResponse objResp;
System.IO.StreamReader sReader;
string strReturn = string.Empty;
try

objWebReq = System.Net.WebRequest.Create(objUrl);
objResp = objWebReq.GetResponse();
sReader = new System.IO.StreamReader(objResp.GetResponseStream());
strReturn = sReader.ReadToEnd();
sReader.Close();
objResp.Close();

catch (Exception ex)


finally

objWebReq = null;

return strReturn;

Ruby版本:

[ruby]
#!/usr/bin/env ruby

require 'csv'
require 'net/http'
require 'open-uri'
require 'optparse'
require 'uri'

fields = [:country_code,
:country_name,
:region_code,
:region_name,
:city_name,
:latitude,
:longitude,
:metro_code,
:area_code,
:time_zone,
:continent_code,
:postal_code,
:isp_name,
:organization_name,
:domain,
:as_number,
:netspeed,
:user_type,
:accuracy_radius,
:country_confidence,
:city_confidence,
:region_confidence,
:postal_confidence,
:error]

options = :license => "YOUR_LICENSE_KEY", :ip => "24.24.24.24"
OptionParser.new |opts|
opts.banner = "Usage: omni-geoip-ws.rb [options]"

opts.on("-l", "--license LICENSE", "MaxMind license key") do |l|
options[:license] = l
end

opts.on("-i", "--ip IPADDRESS", "IP address to look up") do |i|
options[:ip] = i
end
.parse!

uri = URI::HTTP.build(:scheme => 'http',
:host => 'geoip.maxmind.com',
:path => '/e',
:query => URI.encode_www_form(:l => options[:license],
:i => options[:ip]))

response = Net::HTTP.get_response(uri)

unless response.is_a?(Net::HTTPSuccess)
abort "Request failed with status #response.code"
end

omni = Hash[fields.zip(response.body.encode('utf-8', 'iso-8859-1').parse_csv)]

if omni[:error]
abort "MaxMind returned an error code for the request: #omni[:error]"
else
puts
puts "MaxMind Omni data for #options[:ip]";
puts
omni.each |key, val| printf " %-20s %s\n", key, val
puts
end
#!/usr/bin/env ruby
require 'csv'
require 'net/http'
require 'open-uri'
require 'optparse'
require 'uri'
fields = [:country_code,
:country_name,
:region_code,
:region_name,
:city_name,
:latitude,
:longitude,
:metro_code,
:area_code,
:time_zone,
:continent_code,
:postal_code,
:isp_name,
:organization_name,
:domain,
:as_number,
:netspeed,
:user_type,
:accuracy_radius,
:country_confidence,
:city_confidence,
:region_confidence,
:postal_confidence,
:error]
options = :license => "YOUR_LICENSE_KEY", :ip => "24.24.24.24"
OptionParser.new |opts|
opts.banner = "Usage: omni-geoip-ws.rb [options]"
opts.on("-l", "--license LICENSE", "MaxMind license key") do |l|
options[:license] = l
end
opts.on("-i", "--ip IPADDRESS", "IP address to look up") do |i|
options[:ip] = i
end
.parse!
uri = URI::HTTP.build(:scheme => 'http',
:host => 'geoip.maxmind.com',
:path => '/e',
:query => URI.encode_www_form(:l => options[:license],
:i => options[:ip]))
response = Net::HTTP.get_response(uri)
unless response.is_a?(Net::HTTPSuccess)
abort "Request failed with status #response.code"
end
omni = Hash[fields.zip(response.body.encode('utf-8', 'iso-8859-1').parse_csv)]
if omni[:error]
abort "MaxMind returned an error code for the request: #omni[:error]"
else
puts
puts "MaxMind Omni data for #options[:ip]";
puts
omni.each |key, val| printf " %-20s %s\n", key, val
puts
end
参考技术D 这个好像手机没有这个功能吧,最多就是通过软件定位....

如何获取用户当前的国家并保护它免受操纵?

【中文标题】如何获取用户当前的国家并保护它免受操纵?【英文标题】:how to get user's current country and protect it from manipulation? 【发布时间】:2014-11-07 15:31:05 【问题描述】:

我正在开发 iOS、Android 和 Web 上的 Facebook 应用程序。我想获取用户当前所在的国家/地区并保护它免受操纵?

此功能必须在移动应用和网络应用中都具有实用性。并且不能被用户操纵(它必须显示他们当前所在的真实国家,并且他们无法更改)。

我该怎么做?

我可以使用 Facebook 应用获取用户位置吗?它是真实的位置还是只是用户在他们的个人资料上写的位置?

【问题讨论】:

【参考方案1】:

一般来说,获取准确的地理信息可以使用几种技术。

GPS定位

这是在用户的设备上完成的,因此它可能会被伪造且不可信。例如,Android官方模拟器允许用户输入任意数据进行测试。

地理IP

假设用户可以通过 IP 网络连接到服务器,他将拥有一个 IP 地址。然后在您控制的服务器端,您可以查询现有的 GeoIP 数据库之一,以根据 IP 地址估计用户位置。

虽然您是查找国家/地区代码的人,但它可能会被伪造,例如通过使用位于不同国家/地区的代理服务器。

设备语言/国家

例如在 Android 上通过使用电话 API 是可行的:

TelephonyManager manager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
String countryCode = manager.getNetworkCountryIso();

我不确定它是否容易修改,但这绝不是一种可移植的方法,尤其是对于 Web 应用程序。

在后一种情况下,可以使用accept-language HTTP 请求标头,因为浏览器通常会宣传用户最喜欢的语言。虽然不准确,但在语言是一个国家独有的情况下,它仍然可以估计用户所在的国家/地区。 就像每个用户提供的信息一样,它仍然不能被信任。

底线

很少能保证用户的地理信息是准确的,特别是因为受国家/地区保护的多媒体内容的出现代表了人们积极寻找解决此类保护措施的动力。

【讨论】:

以上是关于android怎么获取用户所在地 csdn的主要内容,如果未能解决你的问题,请参考以下文章

如何获取用户当前的国家并保护它免受操纵?

如何获取某个国家/地区的位置点取决于 Android 手机配置

通过微博API怎么获取用户发微博的实际地点

Android一次获取用户位置

Android 如何查找so文件所在目录,安装APK时so安装到哪个目录

java如何获得客户端域用户名和域用户所在的域的名称