|
YAACC - UPNP Client and Server
|
Manages MediaProjection for capturing system audio and screen. More...

Classes | |
| interface | MediaProjectionStopCallback |
Static Public Member Functions | |
| static void | setStopCallback (MediaProjectionStopCallback callback) |
| Set callback for when MediaProjection stops. | |
| static Intent | createPermissionIntent (Context context) |
| Create intent to request MediaProjection permission. | |
| static boolean | handlePermissionResult (Context context, int resultCode, Intent data) |
| Handle permission result from activity. | |
| static boolean | createMediaProjectionFromStored (Context context) |
| Create MediaProjection from a foreground service using stored permission. | |
| static boolean | createMediaProjection (Context context, int resultCode, Intent data) |
| Create MediaProjection from a foreground service. | |
| static MediaProjection | getMediaProjection () |
| Get current MediaProjection instance. | |
| static boolean | isActive () |
| Check if MediaProjection is active. | |
| static boolean | hasPermission () |
| Check if we have stored permission (either active or pending). | |
| static void | clearPermission () |
| Clear stored MediaProjection permission. | |
| static void | stopMediaProjection () |
| Stop MediaProjection and release resources. | |
Static Public Attributes | |
| static final int | REQUEST_CODE_MEDIA_PROJECTION = 2001 |
Manages MediaProjection for capturing system audio and screen.
Requires Android 10+ (API 29).
|
static |
Create MediaProjection from a foreground service.
Must be called from a service with FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION.
|
static |
Create MediaProjection from a foreground service using stored permission.
Must be called from a service with FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION.
|
static |
Handle permission result from activity.
Note: MediaProjection must be created from a foreground service.