Search code examples
androidandroid-permissionsandroid-mediarecorder

unknown permission android.permission.RECORD_VIDEO


Suddenly in my logs in "warn" I've found this :

unknown permission android.permission.RECORD_VIDEO

And this happened on a device that fails to do a MediaRecorder.start() method with simple and uninformative "start fails" error message.

java.lang.RuntimeException: start failed.
    at android.media.MediaRecorder.start(Native Method)
    at com.vladdrummer.headsup.ScreenVideoRecorder.record(ScreenVideoRecorder.java:94)

App is working on many devices, but some have this kind of a problem - it fails to start, although , preparing went fine

So, may be theese two errors are connected? what should I do with "unknown permission android.permission.RECORD_VIDEO" ??


Solution

  • There is no permission as

    android.permission.RECORD_VIDEO
    

    See here

    Ideally you should be using these permission

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    

    Also manifest should have

    <uses-feature android:name="android.hardware.Camera"/>