I wrote an Android application using MediaRecorder to record and save an Mp4. The code works, but the video will not appear in my gallery until I have turned my device off and back on again. The file doesn't save until the tablet, phone, etc. is turned off. It doesn't throw any type of error. Does anyone have any suggestions to why this issue may be occurring? I've looked everywhere and it seems like I am the only one with this issue. I have tried it on many devices and the problem remains.
Asked
Active
Viewed 409 times
1
-
3You need to register video in MediaStore. Here is an example http://stackoverflow.com/a/11746999/631814 – Stepango Jun 11 '15 at 13:58
-
Where do I call this method from? And what file do I send it through the parameters. Right now the only file I have is the root. – Imapotato123 Jun 11 '15 at 14:11
-
Call this method right after you finish to save video in a file. – Stepango Jun 11 '15 at 14:13
-
what do I make it's parameter? Also Thank you. – Imapotato123 Jun 11 '15 at 14:17
-
new File("your/file/path") – Stepango Jun 11 '15 at 14:18
-
Okay so it seemed to work the first time. I put that method call after I released the mediarecorder and set it to null, but now it isn't saving anything. The first time it created a folder and saved a blank video. – Imapotato123 Jun 11 '15 at 14:27