获取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();
检查GPS功能启用状态
本文介绍了一种通过Android LocationManager API来判断GPS功能是否启用的方法,通过简单的代码示例展示了如何实现这一功能。
2550

被折叠的 条评论
为什么被折叠?



