public static Uri resourceToUri(@AnyRes final int resId) {
        final Context context = CgeoApplication.getInstance().getApplicationContext();
        return Uri.parse(SCHEME_ANDROID_RESOURCE + "://" +
            context.getResources().getResourcePackageName(resId) + '/' +
            context.getResources().getResourceTypeName(resId) + '/' +
            context.getResources().getResourceEntryName(resId));
    }
Creates an Uri pointing at an android resource
main/src/main/java/cgeo/geocaching/utils/UriUtils.java