Just trying to use Mapbox Android Services in your application? You don't need to read this stuff! We provide easy-to-install, prebuilt versions of MAS for Android and Java that you can download instantly and get started with fast.
Still with us? These are the instructions you'll need to build Mapbox Android Services from source.
Your journey will start with getting the source code, adding your Mapbox access token for testing, and begin developing.
Clone the git repository:
git clone https://github.com/mapbox/mapbox-java.git
cd mapbox-java
Using the MAS testapp will require a valid Mapbox access token. It is recommend to create a res/values/developer-config.xml
development file which will include your access token. Use the example below for reference:
<resources>
<string name="mapbox_access_token"><your access token here></string>
</resources>
Add the gradle property or env variable with a secret token. The token needs to have the DOWNLOADS:READ
scope. You can obtain the token from your Mapbox Account page.
We recommend using Android Studio to work on the code base.