Skip to content

Conversation

@SamuelGadiel
Copy link

This PR resolves #1035

Migrated from deprecated LocationRequest to Priority
Priority doesn't have a PRIORITY_NO_POWER property, according to its documentation we should use PRIORITY_PASSIVE

LocationRequest.PRIORITY_NO_POWER -> Priority.PRIORITY_PASSIVE


On SDK 31+ location.isFromMockProvider() is deprecated, but older versions of android still uses it, so we have to annotate the method with @SuppressWarnings("deprecation")
If the project is running sdk 31+ we use location.isMock(), otherwise we fallback to location.isFromMockProvider()


For the LocationRequest.create() we have to use the new builder LocationRequest.Builder(). The parameters are passed to the builder, and not the mLocationRequest directly


The new Long() and new Float() were migrated to Number, and manipulated so we could have a proper Long and Float values

If I missed something, please point it out so I can fix it

@docs-page
Copy link

docs-page bot commented Aug 11, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/lyokone/flutterlocation~1036

Documentation is deployed and generated using docs.page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix deprecation messages when building the app

1 participant