java.lang.SecurityException: Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.

  1. 0

    Why error occurs when adding a manifest CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT?

    Stack Overflow | 4 months ago | Влад Новосельцев
    java.lang.SecurityException: Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.
  2. 0
    samebug tip
    Use ACTION_OPEN_DOCUMENT instead of ACTION_GET_DOCUMENT.
    via GitHub by phime42
  3. 0
    samebug tip
    You should add the permission android.permission.READ_EXTERNAL_STORAGE to your manifest file.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    You need the permission android.permission.READ_EXTERNAL_STORAGE. Write <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> on the Android Manifest
  6. 0
    samebug tip
    MANAGE_USERS has a protection level of signature|system, so your application must be signed with the platform key.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.SecurityException

      Requires CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission, or an appropriate MediaProjection token in order to create a screen sharing virtual display.

      at android.os.Parcel.readException()
    2. Android Platform
      DisplayManager.createVirtualDisplay
      1. android.os.Parcel.readException(Parcel.java:1599)
      2. android.os.Parcel.readException(Parcel.java:1552)
      3. android.hardware.display.IDisplayManager$Stub$Proxy.createVirtualDisplay(IDisplayManager.java:484)
      4. android.hardware.display.DisplayManagerGlobal.createVirtualDisplay(DisplayManagerGlobal.java:377)
      5. android.hardware.display.DisplayManager.createVirtualDisplay(DisplayManager.java:537)
      6. android.hardware.display.DisplayManager.createVirtualDisplay(DisplayManager.java:529)
      7. android.hardware.display.DisplayManager.createVirtualDisplay(DisplayManager.java:480)
      7 frames
    3. com.example.novoseltsev
      MainActivity.onCreate
      1. com.example.novoseltsev.applicationpopupwindow.MainActivity.onCreate(MainActivity.java:106)
      1 frame
    4. Android Platform
      ActivityThread.handleLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:6237)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
      4. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
      4 frames