//注册定位监听
LocationClient mLocClient = app.mLocationClient;
mLocClient.registerLocationListener(new BDLocationListener()
{
@Override
public void onReceivePoi(BDLocation arg0)
{
Log.d(TAG, "Enter onReceivePoi()");
}
@Override
public void onReceiveLocation(BDLocation location)
{
Log.d(TAG, "Enter onReceiveLocation()");
在AndroidManifest.xml文件中加上 :
<service
android:name="com.baidu.location.f"
android:enabled="true"
android:process=":remote" >
<intent-filter>
<action android:name="com.baidu.location.service_v2.2" >
</action>
</intent-filter>
</service>