feat: Added optional speed parameter for proper location mocking#70
Merged
mykola-mokhnach merged 1 commit intoappium:masterfrom Mar 5, 2021
salabogdan:CustomLocationSpeed
Merged
feat: Added optional speed parameter for proper location mocking#70mykola-mokhnach merged 1 commit intoappium:masterfrom salabogdan:CustomLocationSpeed
mykola-mokhnach merged 1 commit intoappium:masterfrom
salabogdan:CustomLocationSpeed
Conversation
Contributor
|
Could you please sign the CLA? |
Contributor
Author
Contributor
Author
|
Also the failing checks should not be related to my code changes. I am not sure if i need to do anything more there. |
Contributor
|
I've addressed the linter issue in #71 |
Contributor
Author
|
After several attempts i finally did it! :)) |
mykola-mokhnach
approved these changes
Mar 5, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This is required in order to properly mock location updates for applications that require valid speed.
Setting location speed to 0.0 will make the location.hasSpeed() method to wrongly report that it has valid speed even though location.speed is 0.0 and in documentation this value is considered as invalid speed.
This was improved by enabling to set speed from exterior by sending "speed" parameter or if no speed was provided then the speed field will no longer be set making the location object to correctly report that it does not have speed.
This is related to: