Skip to content

[Android] Geolocation IsListeningForeground property is always false#21919

Merged
PureWeen merged 2 commits into
dotnet:mainfrom
dartasen:#21439-fix-islisteningForeground
May 22, 2024
Merged

[Android] Geolocation IsListeningForeground property is always false#21919
PureWeen merged 2 commits into
dotnet:mainfrom
dartasen:#21439-fix-islisteningForeground

Conversation

@dartasen
Copy link
Copy Markdown
Contributor

@dartasen dartasen commented Apr 18, 2024

Description of Change

Remove the var keyword so the targetted continousListener is the static one inside the class instead of a local variable

var continuousListener = new ContinuousLocationListener(LocationManager, providerInfo.Accuracy, listeningProviders);

continuousListener is always null, that causes the property IsListeningInForeground to be always false and making it impossible to Stop the listener

Issues Fixed

Fixes #21439

@dartasen dartasen requested a review from a team as a code owner April 18, 2024 15:06
@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label Apr 18, 2024
@matt-ptitbonom
Copy link
Copy Markdown

Do you know when this could be merged? We'd love to have this available for our business ❤️

@elparasite
Copy link
Copy Markdown

Hi, it would be very useful for my project too.

@jsuarezruiz jsuarezruiz added platform/android area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info labels Apr 22, 2024
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@matt-ptitbonom
Copy link
Copy Markdown

Hi guys, with any luck, could someone look into the failed jobs to push this PR a bit further? The failed tests seem unrelated to the PR itself: given that the change only applies to Android platform and the failed tests aren't.

@ghuotvez
Copy link
Copy Markdown

ghuotvez commented May 6, 2024

Yeah that would also be useful for my project.

@dartasen
Copy link
Copy Markdown
Contributor Author

dartasen commented May 6, 2024

@jsuarezruiz ?

@jsuarezruiz
Copy link
Copy Markdown
Contributor

Added device test.

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@dartasen
Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@dartasen
Copy link
Copy Markdown
Contributor Author

Thank's for adding a test @jsuarezruiz ! 😄

@PureWeen PureWeen merged commit d86ac0e into dotnet:main May 22, 2024
@dartasen dartasen deleted the #21439-fix-islisteningForeground branch May 22, 2024 03:06
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution fixed-in-8.0.60 fixed-in-9.0.0-preview.5.24307.10 platform/android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Geolocation IsListeningForeground property is always false

7 participants