How to add background service in Geofence android
问题 I am trying to create a geofence with background service for monitor. The geofence create successfully and work when apps Activity is open but when close the app geofence not work. What should I do now. My code is: public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);