Android Open Source - android-observable-location Observable Location Provider






From Project

Back to project page android-observable-location.

License

The source code is released under:

MIT License

If you think the Android project android-observable-location listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.zmarkan.observablelocation;
//from www . j a  v a 2s .  c o  m
import android.location.Location;

import com.google.android.gms.location.LocationRequest;

import rx.Observable;


/**
 * Created by zan on 26/12/14.
 */
public interface ObservableLocationProvider {

    /**
     * Base request.
     * @return observable that starts/stops getting updates when unsubscribe
     * @param locationRequest the request with all parameters set
     * */
    public Observable<Location> provideLocationUpdates(LocationRequest locationRequest);

    /**
     * @param locationRequest the request with all parameters set
     * */
    public Observable<Location> provideSingleLocationUpdate(LocationRequest locationRequest);
    
    
    /**
     * Default request. Will provide fused location updates every 5-10 seconds
     * */
    public Observable<Location> provideLocationUpdates();

    
    public Observable<Location> provideSingleLocationUpdate();

}




Java Source Code List

com.zmarkan.observablelocation.LocationUpdatesObservableTest.java
com.zmarkan.observablelocation.LocationUpdatesObservable.java
com.zmarkan.observablelocation.ObservableLocationProviderImpl.java
com.zmarkan.observablelocation.ObservableLocationProvider.java
com.zmarkan.observablelocation.sample.ApplicationTest.java
com.zmarkan.observablelocation.sample.DemoActivity.java