I know this question is ask number of times but wait i am asking something different.
I follow this post and able to take screen shot. but is it possible to take screen shot when my application is closed.
Supposed i set timer like after 1 hour and i close my app. Then exactly after 1 hour device need to take a screen shot whatever on a screen.
Is this possible with Background Services?
I already follow code and also did some research but is this possible?
Is it necessary to root device to take screenshot.
Please give me any hint or reference.
Thanks in advance.
Try using : call the methods in this library from service.
http://code.google.com/p/android-screenshot-library/
Android Screenshot Library (ASL) enables to programmatically capture screenshots from Android devices without requirement of having root access privileges. Instead, ASL utilizes a native service running in the background, started via the Android Debug Bridge (ADB) once per device boot.
DeveloperGuide
UPDATE:
The method mentioned in your reference will not work in that case, as it reads the view that are drawn and in application context. where as if application is closed then you cant get that context.( at-least on non rooted phone).
On rooted device you can read complete frame-buffer so no need to worry about the application context.
I did tried to use the ASL once and it worked out good for me.
Related
As the title stated, I want to design simple application without interaction from the user. After installation it will block the camera. then start a timer to release it after some time.
I tried 2 options: device manager using set camera disabled method but I could not run the project because of some errors in the manifast.
now I'm trying just to create a camera object to reserve the camera from other applications. but still the native camera app was able to start the camera.
My question: is my method correct? or there are much simpler ways to do it.
device manager using set camera disabled method but I could not run the project because of some errors in the manifast.
Perhaps you should consider asking a separate Stack Overflow question where you explain what you tried and what specific problems you encountered. If by "device manager" you mean the device administration APIs, this is the proper way of implementing what you want.
is my method correct?
No.
I'm working on UI automation tests for an Android app. I need to save off a screenshot of the app as it appears during various steps of the test for later analysis by test engineers.
The usual way to do this in Android is to get the Window, then get the DecorView, then call onDraw with a Canvas backed by a Bitmap and save the Bitmap. This doesn't work when a Dialog is showing on top of an Activity, however. The Dialog and Activity each have their own separate DecorView.
Is there any way to programatically take a screenshot of the entire app with all windows composited? Unfortunately, the device is not rooted and the app does not have signature permissions, so this answer in another thread does not apply:
https://stackoverflow.com/a/13837910/244521
For phone devices: This article shares some tips that might help. However, on ICS and above, you may need to use Home + Power, not Volume Down + Power, as the article says.
For automated tests, perhaps AutomatedScreenshots will help
I'm looking for some help from developers who are know android development. We have a client who wants to use an Android tablet as a means of collecting data when someone walks into their office. The problem is that they don't want any of the background functions or access to the net on the device (it's there to log people in so it should not move from that function with out some other credentials to "unlock" the device.)
With apple I know you can lock the screen on to a page/app but not sure about android? Can't find any thing online that would tell me it can be done on android.
With Android you can replace the launcher (home screen) app, and if that app doesn't give you access to launching other things, then you cannot do other things. The first time you press the home key after installing another launcher candidate, Android asks you which home screen application to run (the original or your new one) and allows you to set your answer as the default, eliminating the question in the future.
HI ,
I need to keep track of installed applications which are used most and least in android device... can anyone help me how to do this programmatically in android...??
My question some thing like , I need to capture the event/Intent which will/may happen when the apllication is launched every time...(like BOOT_COMPLETED will be brodcasted when device booted).
This does not seem possible (unless the launcher/home screen or applications cooperate, e.g. through instrumentation: but that would be strange in production code!). See also this related question.
Edited to add: indiscriminate capture of application launch intents is not AFAIK permitted. Were Android to add such functionality, the security implications would be significant (particularly if interception or modification were allowed!). What you are describing could be (partially) achieved by replacing the home screen.
Some degree of usage information is collected already - from the launcher go to settings - about phone - battery use.
I think this resets every time you go on a charger, and don't know if its visible to ordinary apps.
I was wondering if there is a way to take a screenshot of the current screen inside the mobile phone using a service (I know how to do it through DDMS though)
Not without root access.
Just for encouragement I would like to say that on Android Developer Challenge 2 there is an application called 'drocap' that does exactly this - takes screenshots on the phone. This is running on my stock european Hero, so no root access required.
But I have no idea how it works. So - keep looking ;)