public Uri getUri(String path, int resourceType) {
        if (path == null || path.isEmpty()) return Uri.EMPTY;

        // Resource file from res directory
        if (path.startsWith("res:")) return getUriForResource(path, resourceType);

        // File from www folder
        if (path.startsWith("www") || path.startsWith("file://")) return getSharedUriForAssetFile(path);

        // Shared file in the shared_files directory
        if (path.startsWith("shared://")) {
            // Create content:// Uri
            return getSharedUri(new File(getSharedDirectory(), path.replace("shared://", "")));
        }

        // Path not recognizeable
        Log.e(TAG, "Path not recognizeable: " + path);
        return Uri.EMPTY;
    }
The Uri for a path.
@param path The path to get the Uri for.
@param resourceType Only needed, if the path is a res:// path. Represents the type of the resource,
can be {@link AssetUtil#RESOURCE_TYPE_DRAWABLE} or {@link AssetUtil#RESOURCE_TYPE_RAW}.
@return The Uri for the path or {@link Uri.EMPTY} if the path is empty, does not exists or is not recognizeable.
src/android/util/AssetUtil.java