You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
MapboxAccountManager will be a centralized place for developers to configure their apps to use Mapbox technology on Android. This will be the preferred (and ultimately only as of 5.0.0) place to set the app's Access Token. The use case for the developer will be to configure it in the onCreate() method of either:
The App's Custom Application object (if app uses one)
While implementing this we'll immediately mark the setAccessToken() and getAccessToken() in MapView and MapboxMap as deprecated starting in 4.1.0 with the goal of removing them as of 5.0.0.
I've built out the basic MapboxAccountManager API and refactored the Telemetry initialization process to support being started in multiple locations (MapboxAcccountManager and MapView). I've successfully tested the MapView setup to confirm that it still starts and stops as it's always done. Next up is to convert the TestApp to use MapboxAccountManager and confirm that Telemetry works as desired there too.
I have now added MapboxAccountManager.start() to the TestApp's custom Application object called MapboxApplication while leaving the Access Token setup in the TestApp's activities that contained MapViews. Afterwards I successfully tested the Telemetry process and confirmed that it did start from the Application object and stopped itself from restarting when the different MapViews loaded.
Next up is to remove all the Access Token's from the TestApp's activities so that only MapboxAccountManager.start() is used. Once this is done we'll have both use cases implemented and tested.
I just refactored the TestApp to remove MapView.setAccessToken() uses, both programmatically and via Layout XML. The TestApp continued to work as expected relying on the MapboxAccountManager.start() in the Application object.
Things are looking pretty good overall. Just need to do another round of testing to confirm that things are as good as they currently appear as well as one last specific test of setting MapboxAccountManager.start() in an Activity's onCreate() method instead of the Application's.
Activity
[android] #5004 - Initial MapboxAccountManager singleton
zugaldia commentedon May 11, 2016
/sub
tmcw commentedon May 11, 2016
@zugaldia you can subscribe with the button on the right :)
[android] #5004 - Adding Deprecation annotations
[android] #5004 - Removing Access Token from being persisted when Map…
[android] #5004 - Refactoring API to use start() for implementing dev…
[android] #5004 - Allowing MapboxAccountManager and MapView to both i…
bleege commentedon May 13, 2016
I've built out the basic
MapboxAccountManagerAPI and refactored the Telemetry initialization process to support being started in multiple locations (MapboxAcccountManagerandMapView). I've successfully tested theMapViewsetup to confirm that it still starts and stops as it's always done. Next up is to convert the TestApp to useMapboxAccountManagerand confirm that Telemetry works as desired there too.[android] #5004 - Putting MapboxAccountManager.start() in TestApp's A…
bleege commentedon May 13, 2016
I have now added
MapboxAccountManager.start()to the TestApp's custom Application object calledMapboxApplicationwhile leaving the Access Token setup in the TestApp's activities that containedMapViews. Afterwards I successfully tested the Telemetry process and confirmed that it did start from the Application object and stopped itself from restarting when the differentMapViews loaded.Next up is to remove all the Access Token's from the TestApp's activities so that only
MapboxAccountManager.start()is used. Once this is done we'll have both use cases implemented and tested.[android] #5004 - Rewiring MapView to look for Access Token from Mapb…
[android] #5004 - Removing Access Tokens from Layout XML
[android] #5004 - Removing usage of MapView.setAccessToken() in TestApp
bleege commentedon May 13, 2016
I just refactored the TestApp to remove
MapView.setAccessToken()uses, both programmatically and via Layout XML. The TestApp continued to work as expected relying on theMapboxAccountManager.start()in the Application object.Things are looking pretty good overall. Just need to do another round of testing to confirm that things are as good as they currently appear as well as one last specific test of setting
MapboxAccountManager.start()in an Activity'sonCreate()method instead of the Application's.[android] #5004 - Deprecating Access Token in MapboxMapOptions
[android] #5004 - Centralizing validateAccessToken in MapboxAccountMa…
[android] #5004 - Cleaning
bleege commentedon May 15, 2016
Documenting Workflows
Ways To Set Access Token
MapView Flow Chart (Each Step Is Progressive From Top To Bottom
MapView.setAccessToken()
What Access Token Source Of Truth Is Being Used?
MapboxAccountManager.getInstance()is null then it's MapView style.MapboxAccountManager.getInstance()is NOT NULL then it's MapboxAccountManager.Deprecated Now, Will Be Removed in 5.0.0
[android] #5004 - Introducing MapboxAccountManager
bleege commentedon May 15, 2016
Squashed, Rebased, and Merged!