[android] - expose setAccesToken on Mapbox.java

This commit is contained in:
Tobrun
2018-11-16 17:04:16 +01:00
committed by Tobrun
parent efe4f4c09d
commit 9a7eecea75
2 changed files with 25 additions and 1 deletions

View File

@@ -68,7 +68,7 @@ public final class Mapbox {
}
/**
* Access token for this application.
* Get the current active access token for this application.
*
* @return Mapbox access token
*/
@@ -78,6 +78,15 @@ public final class Mapbox {
return INSTANCE.accessToken;
}
/**
* Set the current active accessToken.
*/
public static void setAccessToken(String accessToken) {
validateMapbox();
INSTANCE.accessToken = accessToken;
FileSource.getInstance(getApplicationContext()).setAccessToken(accessToken);
}
/**
* Application context
*