public static String getResourceName(String resourcePath) {
        String resourceName = resourcePath;

        // Get the filename without the path
        if (resourceName.contains("/")) {
            resourceName = resourceName.substring(resourceName.lastIndexOf('/') + 1);
        }

        // Remove file extension
        if (resourceName.contains(".")) {
            resourceName = resourceName.substring(0, resourceName.lastIndexOf('.'));
        }

        return resourceName;
    }
Gets the resource name from the path.
@param resourcePath Resource path as string.
src/android/util/AssetUtil.java