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

[android] Support late token initialization #9740

Closed
Guardiola31337 opened this issue Aug 9, 2017 · 4 comments
Closed

[android] Support late token initialization #9740

Guardiola31337 opened this issue Aug 9, 2017 · 4 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@Guardiola31337
Copy link
Contributor

Right now, we're initializing telemetry as a consequence of setting the access token Mapbox#getInstance 👀 https://github.com/mapbox/mapbox-gl-native/blob/master/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/Mapbox.java#L58-L59 which needs to be set before MapView#onCreate or MapboxConfigurationException will be thrown which means that happens before getting the style. So in order to address it, I suggest moving the initialization to a later time.

@tobrun do you 👀 any problem setting the token when finished loading the style and initial load?

cc/ @zugaldia

@Guardiola31337 Guardiola31337 added the Android Mapbox Maps SDK for Android label Aug 9, 2017
@tobrun
Copy link
Member

tobrun commented Aug 10, 2017

So in order to address it, I suggest moving the initialization to a later time.

It's not clear to me what you are trying to achieve and why?

@tobrun do you 👀 any problem setting the token when finished loading the style and initial load?

Yes, you need your token to load the style.. some additional background, we used to allow setting the token through MapView and MapboxMap.

@tobrun
Copy link
Member

tobrun commented Aug 10, 2017

Linking #7584 as related ticket

@Guardiola31337
Copy link
Contributor Author

mapbox/mapbox-java#537 will fix OP.

@tobrun
Copy link
Member

tobrun commented Aug 16, 2017

Since this issue is handled upstream, going ahead and close this.

@tobrun tobrun closed this as completed Aug 16, 2017
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

No branches or pull requests

2 participants