定位页面

private   void  openGPSSettings() {
LocationManager alm 
=  (LocationManager)  this
.getSystemService(Context.LOCATION_SERVICE);
if  (alm
.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)) {
Toast.makeText(
this " GPS模块正常 " , Toast.LENGTH_SHORT)
.show();
return ;
}

Toast.makeText(
this " 请开启GPS! " , Toast.LENGTH_SHORT).show();
Intent intent 
=   new  Intent(Settings.ACTION_SECURITY_SETTINGS);
startActivityForResult(intent,
0 );  // 此为设置完成后返回到获取界面

}


http://www.cmdeye.com/android/forum.php?mod=viewthread&tid=231

http://blog.csdn.net/hello_haozi/article/details/7564223

http://ifelsend.com/blog/2012/09/06/%E5%BC%80%E6%BA%90%E5%85%8D%E8%B4%B9%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5%E6%8E%A5%E5%8F%A3api%E4%BB%A5%E5%8F%8A%E5%85%A8%E5%9B%BD%E6%89%80%E6%9C%89%E5%9C%B0%E5%8C%BA%E4%BB%A3%E7%A0%81%EF%BC%81.html

你可能感兴趣的:(定位页面)