Android 打开 GPS 导航并获取位置信息
2010-10-19 17:18:28 来源:WEB开发网核心提示:55 // TODO Auto-generated method stub56 Log.i("onProviderDisabled", "come in");57 58 }59 60 @Override61 public void onProviderEnabled(String
55 // TODO Auto-generated method stub
56 Log.i("onProviderDisabled", "come in");
57
58 }
59
60 @Override
61 public void onProviderEnabled(String provider)
62 {
63 // TODO Auto-generated method stub
64 Log.i("onProviderEnabled", "come in");
65 }
66
67 @Override
68 public void onStatusChanged(String provider, int status,
69 Bundle extras)
70 {
71 // TODO Auto-generated method stub
72 Log.i("onStatusChanged", "come in");
73
74 }
75
76 };
77 locationManager.requestLocationUpdates(provider, 1000, (float) 1000.0, llistener);
78 }
79
80 protected void onDestroy()
81 {
82 locationManager.removeUpdates(llistener);
83 locationManager.setTestProviderEnabled(provider, false);
84 super.onDestroy();
85 }
56 Log.i("onProviderDisabled", "come in");
57
58 }
59
60 @Override
61 public void onProviderEnabled(String provider)
62 {
63 // TODO Auto-generated method stub
64 Log.i("onProviderEnabled", "come in");
65 }
66
67 @Override
68 public void onStatusChanged(String provider, int status,
69 Bundle extras)
70 {
71 // TODO Auto-generated method stub
72 Log.i("onStatusChanged", "come in");
73
74 }
75
76 };
77 locationManager.requestLocationUpdates(provider, 1000, (float) 1000.0, llistener);
78 }
79
80 protected void onDestroy()
81 {
82 locationManager.removeUpdates(llistener);
83 locationManager.setTestProviderEnabled(provider, false);
84 super.onDestroy();
85 }
更多精彩
赞助商链接