Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add permission annotations to location methods #3435

Closed
tobrun opened this issue Jan 5, 2016 · 5 comments · Fixed by #3459
Closed

Add permission annotations to location methods #3435

tobrun opened this issue Jan 5, 2016 · 5 comments · Fixed by #3459
Assignees
Labels
Android Mapbox Maps SDK for Android

Comments

@tobrun
Copy link
Member

tobrun commented Jan 5, 2016

The Android support annotations library has an annotation that warns a developer if it would execute a method without properly handling runtime permissions for Android M.

The code would look like:
image

More information on support annotations

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 5, 2016
@tobrun tobrun added this to the android-v3.1.0 milestone Jan 5, 2016
@tobrun
Copy link
Member Author

tobrun commented Jan 5, 2016

This should be added to setMyLocationEnabled

@tobrun
Copy link
Member Author

tobrun commented Jan 6, 2016

Going to add @throws SecurityException if no suitable permission is present comment in the same fashion as Google is documenting there code

@tobrun
Copy link
Member Author

tobrun commented Jan 6, 2016

An example how this translates to a warning is visible here:
screen shot 2016-01-06 at 09 29 06

tobrun added a commit that referenced this issue Jan 6, 2016
…nd bearing tracking, added requires permissions checks and handled them in the test app, update javadoc to reflect changes, formatting commit of MapView, Reposition UserLocationView when location tracking becomes active
@tobrun
Copy link
Member Author

tobrun commented Jan 6, 2016

implemented with #3446

@tobrun tobrun closed this as completed Jan 6, 2016
@tobrun tobrun reopened this Jan 7, 2016
@tobrun
Copy link
Member Author

tobrun commented Jan 7, 2016

seems that MapView code itself must be updated as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants