I am implementing SearchView.
Intention is that it will work like google autocomplete for adress input. I didnt get google places API pricing, and I dont want to risk it.
So I choosed some other service with REST API.
I customized the class and got it working - need some more tuning but it works. Just one problem.
As I dont fully understand how exactly some parts of the class works I have problem to implement following logic.
In Czech Language we have special characters as: ě,š,č,ř,ž,ý,á,í,é and some others but when the people write into mobiles sometimes they use it sometimes they just use the original character.
For example adress "Václavské náměstí" can be writen by user like "Vaclavske namesti" or "Václavske namesti" or any other combination of original and enchanced letters...
I am now in state, that when I write it correctly with all special characters then I get the results, when I write it without it like instead "Václa" i write "Vacla" the API return same set of results thats fine, but then the SearchView class hide it (doesnt include it in list) because "Václa" is not in the input string .. because I wrote "Vacla". and therefore this:
cant find anything....
Dont know what is the bast way to handle that, make sub to get rid of all special characters ? store the original input ? and then substitued them as needed ? but it seems like overkill ...
any ideas ?
usually the easiest way is the best.
Thanks
Intention is that it will work like google autocomplete for adress input. I didnt get google places API pricing, and I dont want to risk it.
So I choosed some other service with REST API.
I customized the class and got it working - need some more tuning but it works. Just one problem.
As I dont fully understand how exactly some parts of the class works I have problem to implement following logic.
In Czech Language we have special characters as: ě,š,č,ř,ž,ý,á,í,é and some others but when the people write into mobiles sometimes they use it sometimes they just use the original character.
For example adress "Václavské náměstí" can be writen by user like "Vaclavske namesti" or "Václavske namesti" or any other combination of original and enchanced letters...
I am now in state, that when I write it correctly with all special characters then I get the results, when I write it without it like instead "Václa" i write "Vacla" the API return same set of results thats fine, but then the SearchView class hide it (doesnt include it in list) because "Václa" is not in the input string .. because I wrote "Vacla". and therefore this:
B4X:
AddItemsToList(prefixList.Get(str2), str1)
AddItemsToList(substringList.Get(str2), str1)
cant find anything....
Dont know what is the bast way to handle that, make sub to get rid of all special characters ? store the original input ? and then substitued them as needed ? but it seems like overkill ...
any ideas ?
usually the easiest way is the best.
Thanks