mapbox-search-android
mapbox-search-android copied to clipboard
Autofill not work until Number and char is filled
Environment
https://docs.mapbox.com/android/search/guides/address-form-fill/
- Search SDK Component (check at least one)
- [ ] Core Search SDK (
SearchEngine
class, and etc.) - [ ] Offline Search SDK (
OfflineSearchEngine
class, and etc.) - [x] Address Autofill SDK
- [ ] Search UI SDK
- [ ] Core Search SDK (
- Android OS version: Any
- Devices affected: Any
- Search SDK Version: 1.0.0-rc.6 / 1.0.0-rc.7
Code examples
Used code from documentation / sample
Observed behavior and steps
In Europe and many other countries address format is Street space HouseNumber
but Autofill suggestion start working after fill Number and Char, not before. So until we fill whole Street number it show: No suggestions found
and thats inacceptable!
Compare this two variants:
- 85 Borivojov
- Borivojov
I expecting show street from Prague after just a few chars like Boriv) but I don't get any results until I fill first number.
Check the videos:
https://github.com/mapbox/mapbox-search-android/assets/1458891/cae72195-ca08-4974-a3e2-1e592397a9f8
https://github.com/mapbox/mapbox-search-android/assets/1458891/9361c23c-1c27-479b-9015-8e87924f5c0f
Expected behavior
Start suggesting street names
Thank you, it's a backend issue, I've notified the team.
UPD
@mtrakal also, it seems that PlaceAutocomplete might be more suitable for your use case
val response = placeAutocomplete.suggestions(
query = "Bor",
options = PlaceAutocompleteOptions(
// Limit results to required types
types = listOf(
PlaceAutocompleteType.AdministrativeUnit.Country,
PlaceAutocompleteType.AdministrativeUnit.Region,
PlaceAutocompleteType.AdministrativeUnit.Postcode,
PlaceAutocompleteType.AdministrativeUnit.District,
PlaceAutocompleteType.AdministrativeUnit.Place,
PlaceAutocompleteType.AdministrativeUnit.Locality,
PlaceAutocompleteType.AdministrativeUnit.Neighborhood,
PlaceAutocompleteType.AdministrativeUnit.Street,
PlaceAutocompleteType.AdministrativeUnit.Address,
)
)
)