I need to download a video to a file without storing it on the device, only to the memory so I can share it without the need of permission:
lateinit var videoFile: InputStream // or what ever type it is suppose to be!
var videoFileUrl = "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_480_1_5MG.mp4"
// download the video to videoFile
val sharingIntent = Intent(Intent.ACTION_SEND)
sharingIntent.type = "video/mp4"
sharingIntent.putExtra(Intent.EXTRA_STREAM, videoFile)
context.startActivity(Intent.createChooser(sharingIntent,"Share Video"))
I've seen other apps doing it so I know a permission isn't required. Please help!