There are various ways to clear address input and standardize it in the expected format. But the only real way to verify the address to ensure that it is real and correct is to use the address verification service.
Standardizing an address is all about how everything looks good — for example, formatting and standardizing a phone number or email address. But data that looks good is not enough. You need data that is good. For example, do you accept an order if the user provides a credit card that may be good? Or do you want a good credit card? Same thing with addresses. If you collect the address, then it would be nice to know that it is real, supplied and can be used for its intended purpose. Otherwise, it’s just garbage data - garbage, garbage.
Fortunately, in your case, since the user is on an Android device, they will most likely have an Internet connection, which will allow you to fulfill a request to a third-party address verification service. There are a number of services that provide address verification. I am the founder of one of them called SmartyStreets . Our LiveAddress API may be exactly what you are looking for. And, depending on your size and business, it may well be absolutely free. If not, it doesn’t matter, there are other services that you can use.
source share