Giter Club home page Giter Club logo

Comments (3)

mrmans0n avatar mrmans0n commented on September 13, 2024

You have to define it in the provider. The default provider is already instantiated for you, but you can override it with a new one with the listener in. You can see it here: https://github.com/mrmans0n/smart-location-lib/blob/master/library/src/main/java/io/nlopez/smartlocation/location/providers/LocationGooglePlayServicesProvider.java

For example, with your code:

SmartLocation.with(QuiApi.getInstance().getApplicationContext()).location().oneFix()
                .provider(new LocationGooglePlayServicesProvider(yourCallbackHere))
                .start(new OnLocationUpdatedListener() {
                    @Override
                    public void onLocationUpdated(Location location) {
                        findPromotion(null, 0, location.getLatitude(), location.getLongitude(), callback);
                    }
                });

As for the second thing you ask: if you copy gradle.properties.example to gradle.properties you would be able to run this project in your Android Studio.

from smart-location-lib.

croccio avatar croccio commented on September 13, 2024

Thank you very much :)

Il giorno 25/feb/2015, alle ore 12:55, Nacho Lopez [email protected] ha scritto:

You have to define it in the provider. The default provider is already instantiated for you, but you can override it with a new one with the listener in. You can see it here: https://github.com/mrmans0n/smart-location-lib/blob/master/library/src/main/java/io/nlopez/smartlocation/location/providers/LocationGooglePlayServicesProvider.java https://github.com/mrmans0n/smart-location-lib/blob/master/library/src/main/java/io/nlopez/smartlocation/location/providers/LocationGooglePlayServicesProvider.java
For example, with your code:

SmartLocation.with(QuiApi.getInstance().getApplicationContext()).location().oneFix()
.provider(new LocationGooglePlayServicesProvider(yourCallbackHere))
.start(new OnLocationUpdatedListener() {
@OverRide
public void onLocationUpdated(Location location) {
findPromotion(null, 0, location.getLatitude(), location.getLongitude(), callback);
}
});
As for the second thing you ask: if you copy gradle.properties.example to gradle.properties you would be able to run this project in your Android Studio.


Reply to this email directly or view it on GitHub #37 (comment).

from smart-location-lib.

myflashlab avatar myflashlab commented on September 13, 2024

provider is private and can't call it like ...oneFix().provider(...
Any suggestions?

from smart-location-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.