I want to save as an image which is on android mobile screen at 10 sec time interval. Which may be home screen or menu screen or any thing. Can anybody tell me how i can achieve this?
I got success for my own application but its not capturing menu screen as an image.
Unfortunately, on most devices it's not possible to get the snapshot of the device outside your application. This, obviously, for security reasons.
This could be achieved accessing the frame buffer at /dev/graphics/fb0, but normally you don't have the permissions to read that.
You need to have a root access to achieve this. Write a background service and execute "/system/bin/screencap" to get the screenshot. Check this answer to find out how to get screenshot and store in sdcard.
Alternatively you can use Android Screenshot library to get screenshots on a non-rooted phones but it requires your phone to be connected to your desktop using ADB.
Related
Couldn't save screenshot
I have searched for " secure-flag " text in that app by using APK Parser. But didn't find any.
So, is there any method to take screenshot on android app that doesn't allow to take screenshot??
may be accomplished by the following ways :
install a screen recorder and record video of the screen. you can then take screenshot of the video later.
install a connector/app to view your phone screen in your PC and then take the screenshot in the PC.
hard way [can cause stability issues. not recommended]: reverse engineer the app and remove such restrictions. then do whatever you wish with the app
Scenario: I want to embed a script/executable (whatever) into a Android device to control the camera app, take photos open and close the camera app. I have root access to the device.
Question: Is it possible to do by using python/adb? how can I do that?
If you have root access then you can do that easily as you have full access to your device. Using background services and sometimes broadcast receivers you can achieve the scenario explained in the question.
Okay so I searched a lot but couldn't find any solution for my problem.
I am trying to develop an android application which will have some background running service. Suppose I opened Gallery and I am seeing some photo and I want my service to store that image's Uri. The problem is how to get image Uri which is being displayed on the screen. Also I want to extend it to Gallery Grid View where I can select multiple photos and ask my service to store their Uris.
I tried using reflection to get object of ViewImage.java class and invoke getCurrentUri() method. But I am getting ClassNotFoundException.
I am looking for a solution even if it requires my app to be system app, rooted device or using reflection to access android gallery code.
I want to get the Uris for Currently played videos or currently selected videos and music files along with documents like pdf, word.
The problem is how to get image Uri which is being displayed on the screen.
Fortunately, this is not possible, for blindingly obvious privacy and security reasons. The interaction between the image-viewing app and the user is between the app and the user; others cannot spy on that information, barring security flaws in the app.
I want to get the Uris for Currently played videos or currently selected videos and music files along with documents like pdf, word.
Fortunately, that too is not possible, barring security flaws.
I tried using reflection to get object of ViewImage.java class and invoke getCurrentUri() method. But I am getting ClassNotFoundException.
Other apps are running in other processes; you cannot use reflection to access them.
I am looking for a solution even if it requires my app to be system app, rooted device or using reflection to access android gallery code.
A custom ROM could probably spy on the communications enough to achieve your ends.
I have found a lot of examples like this:
how to Capture screen in android and covert it to image
I need to capture an screenshot of screen activity, but I'm developing an external library, so I can't get current activity of the application to get the View and then flush the bitmap into canvas. Is there another way to capture a screenshot?
If you are trying to save the image from Snapchat, you need to save the Bitmap in another way.
With a rooted phone you can access the apps storage and copy the image while the app shows it.
That way the app wont notice you took a "Screenshot" :)
Is it possible to capture the entire screen from Android application code? I'm developing an application like VNC for Android platform.
Regards
I think that depends on what you are trying to capture. I'm sure you can use Moss's method to create a screenshot from your own application - that is, something you render yourself.
As I understand it however, capturing from other views, apps, etc. is designed to be impossible for security reasons. This is to avoid apps being able to take screen shots from other apps, which would make it easy to steal sensitive data.
yes it is. You just need to create a canvas and assign it a Bitmap, then draw to that canvas instead of the canvas you use in your onDraw method and save the bitmap on the SDcard for example.
Just to renind you that this method will work if you handle the drawing, so you should use a custom home screen for it to capture wether you want. (just get the default android home screen :D).
I don't have personal experience with it, but this open source project sounds like it might either solve your problem, or provide you clues as to which API to use:
http://sourceforge.net/projects/ashot/
Screen capturing tool for Android
handsets connected via USB to a
desktop/laptop. It is great for
fullscreen presentations, product
demos, automatic screen recording, or
just a single screenshot. Without
root.