cancel
Showing results for 
Search instead for 
Did you mean: 

Video recorder with an in-Game button. Androind MediaRecorder error

aguirreduran
Explorer

Hello,

currently I'm working on a project that needs to record what the user is observing in the Oculus Quest 2. The recording should be triggered by an UI button that the user can use whenever it wants. 


I didn't find any dedicated asset for this purpose, but I found a solution for Android, in particular a screen recorder. It's a simple asset that i tested in my smathphone at it's working well (record the screen using a button from the UI, and save it to the gallery).

 

The asset can be found here:

 https://github.com/thanh-nguyen-kim/Unity_Android_Screen_Recorder

The guide can be found here:

https://killertee.wordpress.com/2018/01/08/unity-android-record-game-screen-with-audio-using-your-ad...


After importing this asset in my project in order to test this "screen recorder" with the Oculus, the application crashes provably with the error:
E Unity :  AndroidJavaException: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaRecorder.start()' on a null object reference
E Unity : java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.MediaRecorder.start()' on a null object reference

 

Any advice to proceed?
 

0 REPLIES 0