Geolocation
MobbSign can add the location of the device to every signature, as additional evidence of where the document was signed. The location is included in the encrypted signature data and as fields of the signature that can be reviewed later:
| Field | Description |
|---|---|
| Latitude and longitude | Coordinates of the device. |
| Accuracy | Accuracy of the location, in metres. |
| Locality and country | Name of the locality and of the country. |
| Country code | ISO code of the country. |
1. Declare the permissions
AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Request the location permission at runtime before the user signs.
2. Enable geolocation
Bundle customizationBundle = new Bundle();
customizationBundle.putBoolean(MobbSignCustomizationProperties.DEVICE_POSITION_ENABLED, true);
mobbSignView = new MobbSignView(this, customizationBundle);
| Property | Description |
|---|---|
DEVICE_POSITION_ENABLED | Adds the location of the device to the signatures. |
DEVICE_POSITION_LAST_TIME | Maximum age of the location for it to be included. |
DEVICE_POSITION_ACCURACY | Minimum accuracy of the location for it to be included. |
If the location cannot be obtained and SHOW_RELEVANT_MESSAGES is enabled, the user is informed.