`
maozilee
  • 浏览: 247482 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

android GPS JAVA 获取GPS功能是否禁用

 
阅读更多

获取GPS功能是否禁用:

mgr=(LocationManager)getSystemService(LOCATION_SERVICE);
    	if(mgr.isProviderEnabled((android.location.LocationManager.GPS_PROVIDER )))
    			Toast.makeText(TestActivity.this,"gps enable", Toast.LENGTH_SHORT).show();
    	else Toast.makeText(TestActivity.this,"gps dis", Toast.LENGTH_SHORT).show();
 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics