求教 地图定位信息怎么回传给activity
@Override
public void onReceiveLocation(BDLocation arg0) {
// TODO Auto-generated method stub
StringBuilder sb = new StringBuilder();
sb.append("时间: ");
sb.append(arg0.getTime());
sb.append("\nerror code: ");
sb.append(arg0.getLocType());
sb.append("\n纬度: ");
sb.append(arg0.getLatitude());
sb.append("\n经度: ");
sb.append(arg0.getLongitude());
sb.append("\n误差径: ");
sb.append(arg0.getRadius());
if (arg0.getLocType() == BDLocation.TypeGpsLocation) {
sb.append("\n速度: ");
sb.append(arg0.getSpeed());
sb.append("\n卫星: ");
sb.append(arg0.getSatelliteNumber());
} else if (arg0.getLocType() == BDLocation.TypeNetWorkLocation) {
sb.append("\n地址: ");
sb.append(arg0.getAddrStr());
}
Log.d(TAG, "定位信息---->" + sb.toString());
if (arg0.getLocType() >= 162) {// 定位失败,则不回复短信
return;
}
我想把定位信息回传给activity处理 这个怎么做啊