If you have a usage question pertaining to the Mapbox Navigation SDK for Android, or any of our other products, contact us through our support page.
If you want to contribute code:
- Ensure that existing pull requests and issues don’t already cover your contribution or question.
- Pull requests are gladly accepted.
- Mapbox uses
ktlint
to enforce good code standards. Make sure to read the codestyle setup. CI will fail if your PR contains any mistakes.
Configuring Ktlint setup
- On Mac OS or Linux: brew install ktlint
- Inside Project's root directory: ktlint --android applyToIDEAProject (current root directories is mapbox-navigation-android-examples)
- ./gradlew ktlint - run ktlint to check code-style
- ./gradlew ktlintFormat - run ktlint and try to fix code-style issues. Return non-0 if cannot fix all issues
Each example must be self contained. All source and resource files must be placed in a single package.
To add new example:
-
Create new package with
res
folder inapp/src/main/java/com/mapbox/navigation/examples/
mapbox-navigation-android-examples/ app/ src/main/ java/com/mapbox/navigation/examples/ myexample/ res/ layout/ mapbox_activity_myexample.xml values/ colors.xml strings.xml styles.xml MyExampleActivity.kt
-
Sync project with Gradle files to ensure new resource folder is registered with
main
source set. -
Create new Activity and add its entry to
app/src/main/java/com/mapbox/navigation/examples/ExamplesList.kt
Include short name, description and a screenshot (570x362).
Don't forget to register your activity in AndroidManifest.xml