2016-04-21 88 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