You would need to pass that data to the geocoder. Also remember that a device can be linked to multiple users at the same time.
Thank you @Tananaev, I got your point. But the problem is that if we have users from different countries, and every country use thier own format for example in Austria, Germany, Spain and USA, all of them are different. What do you think, in which place it will make sense to retrieve the formatted address according to the user's language/preferences? I though we can add an attribute to the user, so then the device can refer to the user language and its position will gecoded accordingly. Any idea or help will be appreciated.
Check where the geocoder is called. It's done in several places.
Hello everyone,
I want to access/read some attributes of the relevant User (for which this being geocoded position and device belongs) in OpenCageGeocoder class, specifically in bellow method:
private static String formatUrl(String url, String key, String language) { if (url == null) { url = "https://api.opencagedata.com/geocode/v1"; } url += "/json?q=%f,%f&no_annotations=1&key=" + key; if (language != null) { url += "&language=" + language; } return url; }
Is there a way to get User data in this method? or maybe in JsonGeocoder class? Any help will be appreciated.
Thanks