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

Offline manager access token #5058

Closed
cammace opened this issue May 17, 2016 · 6 comments
Closed

Offline manager access token #5058

cammace opened this issue May 17, 2016 · 6 comments
Assignees
Labels
Android Mapbox Maps SDK for Android offline

Comments

@cammace
Copy link
Contributor

cammace commented May 17, 2016

MapboxAccountManager has been added in 4.1.0 but we still ask for access token when setting up the OfflineManager object. We should look into using account manager to handle this in the background so users don't need to call setAccessToken still and write something like this:

offlineManager.setAccessToken(MapboxAccountManager.getInstance().getAccessToken());
@cammace cammace added Android Mapbox Maps SDK for Android offline labels May 17, 2016
@tobrun tobrun added this to the android-v4.1.0 milestone May 20, 2016
@tobrun
Copy link
Member

tobrun commented May 20, 2016

Adding this to 4.1.0 since it's related to the deprecation of access tokens setters/getters.

@bleege bleege self-assigned this May 23, 2016
@bleege
Copy link
Contributor

bleege commented May 23, 2016

Yep this is related to the original build out of MapboxAccountManager in #5004. I'll dive into this to make sure that it aligns with the same deprecation strategy that other disparate access token getters and setters were using.

@bleege
Copy link
Contributor

bleege commented May 23, 2016

I ran into #5108 when testing this issue out. I'm going to try an earlier version of master to see if that resolves the runtime issue and if so then test 54050eb3afbce7a4e019dd5b9981235e657bbd85 on it in the interim.

@bleege
Copy link
Contributor

bleege commented May 24, 2016

We ended up solving the issue in #5108 by reverting the NDK upgrade commit. I'm going to rebase off of master now and test out the fixes from yesterday.

@bleege
Copy link
Contributor

bleege commented May 24, 2016

Just rebased and successfully tested! Should be ready to merge now!

bleege added a commit that referenced this issue May 24, 2016
…and automatically setting it if MapboxAccountManager is in use
@bleege
Copy link
Contributor

bleege commented May 24, 2016

The getAccessToken() and setAccessToken() methods in OfflineManager have now been deprecated, while also refactoring it's constructor to check for the existence of MapboxAccountManager and use it if it's set. The TestApp's OfflineActivity has been refactored to remove the explicitly set access token so that it relies on the MapboxAccountManager to set it automatically (which is the new recommended way).

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

No branches or pull requests

3 participants