读书人

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

发布时间: 2012-06-27 14:20:09 作者: rapoo

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();
?

读书人网 >Android

热点推荐