private static int getResourceId(Context context, @javax.annotation.Nullable String name) {
        if (name == null || name.isEmpty()) {
            return 0;
        }
        name = name.toLowerCase().replace("-", "_");

        // name could be a resource id.
        try {
            return Integer.parseInt(name);
        } catch (NumberFormatException e) {
            // Do nothing.
        }

        int id = context.getResources().getIdentifier(
                name,
                "drawable",
                context.getPackageName());
        // Found the given resource name in drawable resource
        if (id > 0) return id;

        // Check if the resource name exists in raw resources
        return context.getResources().getIdentifier(
                name,
                "raw",
                context.getPackageName());
    }
This method takes a path and creates a Uri for it. If given a normal http path,
it'll leave it alone, but given a resource file name (that React gives us), it'll
return the corresponding android-resource:// uri (this is what React Native's
Image uses/does).
android/viro_bridge/src/main/java/com/viromedia/bridge/utility/Helper.java