Getting sub locality null for some lat long?
Geocoder API will return the values depending on lat
long
, if the API
database doesn't have these values exemple : subLocality
then it will return null
only, in my knowledge there's nothing you can do about it. You have to handle these cases gracefully so your app don't crash.
Handling these cases includes you have to put a check using if
condition is that particular value is null
or it has some value, because if you use any of the value somewhere in code without checking and if that value is null
then app might crash whenever that particular value comes null
.