Skip to content

MapsMe android app not reacted to intent router parameter #36

@SeleznevAM

Description

@SeleznevAM

In my task, i want to start maps me app with passing router parameter, but app is opening with last selection route type.
In my observations, i look what it's happen when i not pass lat_from anf lng_from parameters to android intent.
If my intent has lat_from anf lng_from parameters app has react to router paramter and open it with nedded route type.

    private const val PACKAGE = "com.mapswithme.maps.pro"
    private val INTENT = Intent(ACTION)
        .setPackage(PACKAGE)
    private const val VEHICLE = "vehicle"
    private const val PEDESTRIAN = "pedestrian"
    private const val PUBLIC_TRANSPORT = "transit"

    override fun intent(lat: Double, lng: Double, deliveryMethodType: RouteType): Intent {
        val mode = when(deliveryMethodType) {
            WALK -> PEDESTRIAN
            TRANSIT -> PUBLIC_TRANSPORT
            AUTO -> VEHICLE
        }


        return INTENT.apply {
            putExtra(LAT_TO, lat)
            putExtra(LNG_TO, lng)
            putExtra("router", mode);
        }
    }```

This is my code to build intent for starActivity method

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions