- only match valid float numbers - match uri with parameter
This commit is contained in:
parent
d86f0787da
commit
30e5f9b290
|
@ -26,7 +26,7 @@ public class GeoHelper {
|
|||
private static final String SHARE_LOCATION_PACKAGE_NAME = "eu.siacs.conversations.location.request";
|
||||
private static final String SHOW_LOCATION_PACKAGE_NAME = "eu.siacs.conversations.location.show";
|
||||
|
||||
public static Pattern GEO_URI = Pattern.compile("geo:([\\-0-9.]+),([\\-0-9.]+)(?:,([\\-0-9.]+))?(?:\\?(.*))?", Pattern.CASE_INSENSITIVE);
|
||||
public static Pattern GEO_URI = Pattern.compile("geo:(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)(?:,-?\\d+(?:\\.\\d+)?)?(?:;crs=[\\w-]+)?(?:;u=\\d+(?:\\.\\d+)?)?(?:;[\\w-]+=(?:[\\w-_.!~*'()]|%[\\da-f][\\da-f])+)*", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
public static boolean isLocationPluginInstalled(Context context) {
|
||||
return new Intent(SHARE_LOCATION_PACKAGE_NAME).resolveActivity(context.getPackageManager()) != null;
|
||||
|
|
Loading…
Reference in a new issue