skip to Main Content

The Mapbox API allows integration of map services into Android Studio applications.
I’m using it to create a new navigation application. It doesn’t follow the device’s location but always starts in San Francisco this is ok for my purposes. However, I can’t figure out where to change the starting location.

Link to the Code I’m using:

https://github.com/mapbox/mapbox-navigation-android-examples/blob/main/app/src/main/java/com/mapbox/navigation/examples/turnbyturn/TurnByTurnExperienceActivity.kt

I think it should be changeable here somewhere.
Thanks for any answers!

2

Answers


  1. Chosen as BEST ANSWER

    Found my own Answer, it is changeable within the function: onStartNavigation()


  2. You can use mock location in emulator.

    1. Open emulator.
    2. Download any mock location app from play store in emulator (you can also side-load apk by drag and dropping apk in emulator).
    3. In phone settings, go to mock location (System-> Developer Options -> Select mock location app) and select that mock location app you installed.
    4. Select your desired location from mock location app.

    some mock location apps on play store -:

    https://play.google.com/store/apps/details?id=ru.gavrikov.mocklocations

    https://play.google.com/store/apps/details?id=com.lexa.fakegps

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search