Answer the question
In order to leave comments, you need to log in
How to use Smart Location Library for Android?
Hello!
As a novice android developer, I'm trying to use the Smart Location Library to determine coordinates.
I found the Smart Location Library , how to use it until I figure it out.
In accordance with the documentation, I connected the dependency in build.gragle, performed sync.
Now in onCreate I paste the code:
SmartLocation.with(context).location()
.start(new OnLocationUpdatedListener() {
});
Answer the question
In order to leave comments, you need to log in
Context is an activity in this case. You can replace with this. In addition, it is not known how long this lib holds the context, a memory leak is possible. You can replace it with getApplicationContext() - application is the longest living application context.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question