2016-04-21 72 views

回答

2

您可以扩展服务和implemetns方法

public class BackgroundLocationService extends Service implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationListener

检查这个代码执行Background location services.

记得只是删除正确更新自己的位置。否则服务不会停止通过调用stopService方法

+0

private LocationClient mLocationClient;方法现已弃用 – Rana

+0

我需要最新的代码。 – Rana

+0

你检查了链接吗? – Ameer