In GWT, is there a way to find out the user's physical location (country, state etc)?
In order to get the last location of the user, make use of the Java public class FusedLocationProviderClient. It is actually a location service that combines GPS location and network location to achieve a balance between battery consumption and accuracy.
The HTML Geolocation API is used to locate a user's position.
You can use HTML 5's geolocation feature in GWT using the Geolocation API provided by the gwt-mobile-webkit project.
edit: This feature is now included in the GWT SDK itself. See the geolocation
package.
You'll only be able to use this on browsers that support this fairly new feature, though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With