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.
Related
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
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.
i'm developing an app and need to make Activity that take snapshot from current content of device screen.
note: i dont want take picture from my activity content or some view, i want take a picture from all of device screen content. ( like home screen or every applications that are on foreground). i googled many times and search so much.
there is an example code:
View screen = (View)findViewById(R.id.screen);
screen.setDrawingCacheEnabled(true);
bmScreen = screen.getDrawingCache();
showBitmap(bmScreen); // function that show my bitmap image
with this code can capture my activity's view, but i dont want capture onlye my activity. i want make a thread that capture device screen with all of its contents.
can everybody help me please?
You can't do this, mostly for security reasons. If this were possible, some rogue app could silently capture and send somewhere screenshots of everything you are doing on your device.
Why this is not available to non-system apps:
Android let's SDK applications do certain things, and explicitly forbids others. An app is not supposed to read another app's data and similarly an app cannot capture another app's screen. Google has explicitly said that third party apps are not supposed to take screencaptures of other apps. The lack of screen capture API's is a deliberate decision, not an omission. ICS offers screenshot functionality, but it is implemented by the system, and requires a hardware trigger in order to make sure it cannot be started or accessed by third party apps.
While there are ways to do this, they either require root (to read the graphics buffer directly, which is device-dependent), or are not guaranteed to work on all devices/versions.
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
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