【发布时间】:2014-05-20 23:24:49
【问题描述】:
我有我的 GPSTracker 的摘要。它返回用户的位置。成功了。
public class GPSTracker extends Service implements LocationListener {
public GPSTracker(Context context) {
this.mContext = context;
getLocation();
}
public Location getLocation() {
//GET LOCATION CODE
return location;
}
所以,我使用以下代码在我的 MainActivity 中调用此服务:
gps = new GPSTracker(this, marker, googleMap, playbackService);
它正在获取用户的实际位置。我想在我的活动中获得这个位置。该服务需要将位置发送到我的活动。谁能帮帮我?
【问题讨论】:
标签: android android-activity android-service android-broadcast