Is it possible to programmatically dismiss the screen sharing prompt message that pops up when we call MediaProjection.getScreenCaptureIntent()?
No, ordinary apps cannot dismiss system dialogs, particularly those pertaining to permissions.