Sunday, January 26, 2014
How neighborhoods map location information back to the activity
@ Override
public void onReceiveLocation (BDLocation arg0) {
/ / TODO Auto-generated method stub
StringBuilder sb = new StringBuilder ();
sb.append ("Time:");
sb.append (arg0.getTime ());
sb.append ("\ nerror code:");
sb.append (arg0.getLocType ());
sb.append ("\ n Latitude:");
sb.append (arg0.getLatitude ());
sb.append ("\ n Longitude:");
sb.append (arg0.getLongitude ());
sb.append ("\ n Error Path:");
sb.append (arg0.getRadius ());
if (arg0.getLocType () == BDLocation.TypeGpsLocation) {
sb.append ("\ n Speed:");
sb.append (arg0.getSpeed ());
sb.append ("\ n Satellite:");
sb.append (arg0.getSatelliteNumber ());
} Else if (arg0.getLocType () == BDLocation.TypeNetWorkLocation) {
sb.append ("\ n Address:");
sb.append (arg0.getAddrStr ());
}
Log.d (TAG, "location information ---->" + sb.toString ());
if (arg0.getLocType ()> = 162) {/ / locate failed, no reply message
return;
}
I want location information back to deal with how this activity do ah
Reply:
Ding Ding Ding Ding own own own Dingding
Reply:
First coordinates stored in a bean, and then by sending a request handler to the main thread, and then the main line from the bean will be able to get inside
Reply:
Set a poller is not can be achieved ah
Reply:
1 to write a message dispatcher, the need to locate the message received activity registered to this dispatcher, the positioning is completed when the message dispatcher
call2 callback
3. Pass a handler over, sendMessage
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment