Questions tagged [mediaprojectionmanager]

14 questions
5
votes
0 answers

How to use MediaProjection to capture screen in a Service?

As we know, we can use Android MediaProjection API to capture screen in an Activity, but I want to capture screen in a thread of a Service. But Android Service has no onActivityResult() method that MediaProjection need to do something. It seems that…
5
votes
0 answers

How to check whether Media Projection API Service Permission Enabled or not

I am working in an app where I am taking screenshots using Media Projection API. I am able to successfully get the screenshot of the user foreground screen but unfortunately am not able to get the state whether user has already provided Screen…
2
votes
1 answer

Android taking a screenshot with MediaProjectionManager, OnImageAvailable doesn't start

I'm working on a android project, where there is an overlay button that is on top of other apps as well and when this button is clicked a screenshot should be taken. The overlay button works, but the screenshot part doesn't. I don't know why but it…
1
vote
0 answers

Crash: ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION

I've got a video streaming app that has been running well for a number of years but I recently upgraded to targetSdkVersion 28 I'm now seeing the following error... java.lang.SecurityException: Media projections require a foreground service of type…
Dan Eiref
  • 101
  • 1
  • 5
1
vote
2 answers

How to save onActivityResult Intent data in android?

i am using MediaProjectionManager to record video from app,and also give permission for save audio and media storage.
1
vote
2 answers

Can't find screen recorded video (/sdcard/capture.mp4") - Mediaprojection API

I'm still a biginner on android APP development and I'm trying to use Mediaprojection API to record my screen .. the issue that I am facing now is.. After recording I cant find the video file in the defined location (sdcard/capture.mp4) .. below is…
0
votes
1 answer

Can we programmatically dismiss the screen cast message in android? When MediaProjection.getScreenCaptureIntent() is called?

Is it possible to programmatically dismiss the screen sharing prompt message that pops up when we call MediaProjection.getScreenCaptureIntent()?
0
votes
1 answer

Ask MediaProjection permission on the first start app and store MediaProjectionManager instance for using later

I'm writing an application that makes screenshots of display from time to time. I'd like an idea to show for users MediaProjection permission window on the first start app (like normal permissions), save MediaProjectionManager instance in some…
greg
  • 1,417
  • 9
  • 28
0
votes
1 answer

Android 5.0 how to automatically obtain permissions when recording the screen?

MediaProjectionManager.createScreenCaptureIntent(); When sharing the screen, a window asking for permission will pop up. I am looking for a way to automatically obtain all content (permissions) on the screen. I have root access to this…
0
votes
1 answer

Activity is not starting again

i have created an application which uses firebase push notification to get commands and perform that task. my app doesn't have any visible activity but a service which continuously working in background. i have implemented a functionality of taking…
MaKi
  • 263
  • 5
  • 11
0
votes
0 answers

I am getting error. (' android.app.ActivityThread.getApplicationThread()' on a null object reference )

I am trying to access a method of activity which calls the startActivityForResult method and it shows the error I have initialized this in the onCreate method of class enter code here mediaProjectionManager = (MediaProjectionManager)…
0
votes
0 answers

Change Overrided Method to Single-Threaded

How can I create an overrided method where the method is forced to be single-threaded (not async) when originally it was multi-threaded? Specifically I am trying to avoid a "dequeueOutputBuffer can't be used in async mode" error in Grafika's…
0
votes
1 answer

Android Studio does not recognize 'MediaProjectionManager' class

I am trying to make an app for screenshot. I've found there are several guides for using MediaProjectionManager for that purpose. This is one of them. http://www.truiton.com/2015/05/capture-record-android-screen-using-mediaprojection-apis/ I copied…
Walter.JJ
  • 31
  • 1
  • 5
0
votes
1 answer

ImageReader.SetOnImageAvailableLister throws cast error unless IOnImageAvailableListener is implemented by Activity

I'm trying to encapsulate taking a screen shot of the Android screen away from my primary activity. I have a class that implements ImageReader.IOnImageAvailableListner but imageReader.SetOnImageAvailableListener(this, null) in the class throws…