getParcelFileDescriptor() is a private method of the package, so I could not find it in my class (i.e. in another package). I tried to access it by reflection, but finally I understand that it returns the appropriate ParcelFileDescritor if and only if we create our MemoryFile as a link to an existing memory file, in which case we want a File descriptor from this existing memory file . Therefore, this method cannot help us. It also seems that in later versions of Android this method is completely ignored and removed from the class.
source share