public int getResourceId(Resources resources, String resourceName, String resourceDirectory) {
        return resources.getIdentifier(getResourceName(resourceName), resourceDirectory, getPackageName(resources));
    }
Get the resource Id. Searches in a given resource directory and resources.
@param resources The resources where to look for, can be {@link Context#getResources()} or {@link Resources#getSystem()}
@param resourceName Can also be a resource path like "res://mySound", "res://myImage.png", etc.
@param resourceDirectory The directory of the resource, for e.g. "mipmap", "drawable", "raw", etc.
@return The resource ID or 0 if not found.
src/android/util/AssetUtil.java