Is it possible to have a background process detect screen capture - android

I want to build n app that detects when the user takes a screenshot then get the image and use it.
Is it possible without root? My idea is very crude. the app will scan the screenshots holder for changes every second but that is very inefficient. is there another way?

I don't think there is no supported way of doing that. You could try the FileObserver class though and watch for events. Look here: https://developer.android.com/reference/android/os/FileObserver.html

Related

android jave how to retrieve an image of the incoming call screen

Can i put on my activity the incoming call screen as a background?
The picture of the screen of how it looks like when there's a call.
Every phone is different with its screen, thats way im looking for a way
to retrieve it from the phones system if it possible.
Thank you
android jave how to retrieve an image of the incoming call screen
This is not possible, except perhaps on rooted devices. You cannot capture screenshots programmatically, for obvious privacy and security reasons.

Is It possible to set Image as ScreenSaver in Android?

I want to know that Is It possible in Android to set an Image as screenSaver.. I am not sure about the feasibily of screen saver...That is when the phone is Idle, then Instead of showing the black blank screen, my application check the Idle time using OnUserInteraction() method and set an Image as screen saver...?? Please let me know If anybody know about this..
onUserInteraction() is deprecated for a start, and it only listens for events on your Activity.
Secondly, having such a screensaver would require that you use WakeLocks, which consume extra battery. And for a screensaver type app, the battery usage would be extremely high.
You might want to look into Daydreams now, assuming you're fine with Android 4.2 and above only.

Is there a way to remove the pause button from the custom camera view in Android?

I am building an Android app that uses the phone's camera feature. I know there is a way to build a custom camera view. Instead, I am choosing to use the camera app via an intent and not build my own camera view. I want to disable/make disappear the pause button while taking a video and have just the stop button. I looked up the Camera API Guide at www.developer.android.com but it doesn't talk about how I could do this. Does anyone know a way to do this?
I doesn't think that this is possible. Using Intents is just a way to tell Android "hey, I'd like to take a video (photo, see MapView, etc). Can you do it for me?". It may trigger one or MORE Apps listening to that Intent, depending on what apps the user has Installed. Usually you can only choose very basic options via Intents, i.e. take video/picture or tell the MapView at which Position it should show up. These options usually also appear inside the App during normal use. I never see a "CustomCamera-App" that hasn't a pause Button, or where one is able to deactivate it inside the menu. Therefore the chances that it is possible to set that special option tends to zero.

Taking a picture in Background Service

I am searching for a method to take a picture with the Camera of my phone without showing the User a Preview.
I know, that this is designed not to work, because its a security issue, but I am developing a "Get My Phone Back" app, that should be able to identify the thief, that has stolen my phone (in future^^).
So it has to be stealth.
My phone is rooted, so I think there should be a way to do this.
Any suggestions?
Just an idea:
You could start the camera just as described inside the docs, but set the underlying SurfaceView visibility to (View.GONE or View.INVISIBLE). After that, you can try to take pictures...
Not really shure, if this will work, but I think its worth a try

android - use camera from within background service

I'm trying to figure out if it is possible to use a camera video stream from within a background service rather than from a normal intent.
What I had in mind is this:
start the service from my app
this service accesses the video stream and extracts features continuously; depending on the features, it sends network packets (to localhost)
user switches to another app - the service must still be running and extracting features!
Before trying to implement all that, I'd like to know if it was possible.
Thanks in advance
Nicola
yes its possible, check my answer and sample code on one similar thread
Open/Run Camera from background service in android
You have to show the fake preview over the current screen. For that you have to create the surface view with 1*1 px dimension and display the preview in that. You have to draw the surface view over other apps for that.
Check out this library that provides facility to capture image from the background even from the service.
I don't think this is possible as the camera needs a preview screen. See previous question here

Categories

Resources