Search code examples
androideclipsesdkscreenshot

Android - Screenshot of homescreen with button


I am trying to port a windows program I made called Desktop Concealer to android. This program works like any other logout program, but it doesnt actually logout. Which gives the user access to the computer which could be used for a list of things(downloads, installing programs).

The program takes a screenshot of the entire desktop before actually showing the form. Then it gives a login password option. when the user decides its time to logout. the program displays the screenshot over the entire desktop, when clicked anywhere it shows a logout window.

I want to know if i could take a picture / screenshot of the homescreen without having to be there, or if not possible; How could i take a screenshot.

here is a demo of the program on youtube to give you a better understanding of how it works:

http://www.youtube.com/watch?v=6Gl4hNXI7oo


Solution

  • I want to know if i could take a picture / screenshot of the homescreen without having to be there

    In general, you cannot take a screenshot programmatically in any circumstances, for security and privacy reasons.