How do you detect what kind of file the resource is? In my case there could be videos and images.
So in case it's a video, I use a VideoView; and in the case of an image, I use an ImageView?
I'm getting the resource id like this:
AssetFileDescriptor afd = context.getResources().openRawResourceFd(resourceID);