You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MapsMe android app not reacted to intent router parameter #36
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
Activity