Skip to content

Support to supply desired accuracy #25

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Jul 3, 2018
Merged

Conversation

mvanbeusekom
Copy link
Member

@mvanbeusekom mvanbeusekom commented Jul 3, 2018

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Feature (resolves #1 )

⤵️ What is the current behavior?

Currently it is not possible to supply a desired accuracy, possible resulting in high battery use.

🆕 What is the new behavior (if this is a feature change)?

It is now possible to supply a desired accuracy when requesting the position.

💥 Does this PR introduce a breaking change?

Yes (see CHANGELOG.md)

🐛 Recommendations for testing

Run unit-tests: flutter test (or check results from Travis-CI)

📝 Links to relevant issues/docs

Resolves #1

🤔 Checklist before submitting

  • All projects build
  • Rebased onto current develop

@mvanbeusekom mvanbeusekom requested a review from martijn00 July 3, 2018 07:47
Copy link

@manmetplok manmetplok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work :)

@mvanbeusekom mvanbeusekom merged commit 9edfdd4 into develop Jul 3, 2018
@mvanbeusekom mvanbeusekom deleted the feature/configuration branch July 3, 2018 08:30
@martijn00 martijn00 added this to the 1.1 milestone Jul 31, 2018
public void onListen(Object o, EventChannel.EventSink eventSink) {
if (mStreamLocationService != null) {
eventSink.error(
"ALLREADY_LISTENING",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Spelling error ALLREADY -> ALREADY.

"Access to location data denied. To allow access to location services enable them in the device settings.",
null));
public void onCompletion(UUID taskID) {
Iterator<Map.Entry<UUID, Result>> it = mResultHandles.entrySet().iterator();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mResultHandles.remove(taskID);?

mEventSink.error("PERMISSION_DENIED", "Access to location data denied", null);
mEventSink = null;
}
if (taskID == entry.getKey()) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use .equals instead. Otherwise you are comparing object references.

SignalResultHandles((result) -> result.error("ERROR", "Failed to get location.", null));
try {
int index = (Integer) o;
if(index > 0 && index < GeolocationAccuracy.values().length) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should probably be if(index >= 0 && ...

@FalkF FalkF mentioned this pull request Jun 9, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure location refresh interval
4 participants