tags:

views:

105

answers:

2

I know you need root access if you want to capture a screenshot by using a background application. However is it possible to just grab the screen content of your current visible activity owned by your process? This does not seem like a security constraint since the user has already installed your app is currently using your app. If so how does this work?

A: 

If you use ddms you can take a screenshot with Ctrl-S, or under Device -> Screen Capture...

iniju
-1 this is completely unrelated to what he asked
Lo'oris
ekawas
+2  A: 

The only thing I can imagine to work (not tested) is to get the instance of your root layout node and manually call the draw(canvas) with your own canvas that was instantiated with an empty bitmap and then save this bitmap. Sounds like a lot of work but is the only thing I can think of at the moment.

Janusz
yeah I thought about that but it doesn't actually give access to what is being rendered to the screen. For instance a view might be reset by the next redraw in which case if I were trying to find a defect, it wouldn't appear.
Greg
I do think this is the best option though
Greg