Code example for Uri

Methods: getQueryParameter

0
    public static String getAccountUuidFromIntent(Intent intent) {
        final Uri uri = intent.getData();
        if (uri == null) {
            return null; 
        } 
        String uuid = uri.getQueryParameter(ACCOUNT_UUID_PARAM);
        return TextUtils.isEmpty(uuid) ? null : uuid;
    } 
 
    private static long getLongFromIntent(Intent intent, String paramName) {
        long value = -1;
        if (intent.getData() != null) {
            value = getLongParamFromUri(intent.getData(), paramName, -1);
        } 
        return value;
    } 
 
    private static long getLongParamFromUri(Uri uri, String paramName, long defaultValue) {
        final String value = uri.getQueryParameter(paramName);
        if (!TextUtils.isEmpty(value)) {
            try {