2

I am working on an application which rates the content of a view. I use a webview and connect to a server where either a livestream from a camera or a youtube video is being played. In another area the user is supposed to touch and rate what he sees. On Touchdown I would like to create an image of the current state of the (web)view which is connected to the server.

getDrawingCache(); does not do the job, as it returns only a black rectangle for the content. I think I need something which accesses the GPU-data, but I don't know how to do that.

tobyUCT
  • 137
  • 9
  • How about to take a screen shot and crop the relevant part? – TDG Jul 07 '15 at 07:55
  • I thought about that as well but so far I couldn't find any hints on how to do that programatically. I do not have access to the device when the users have it and the keyDown events (volume & power button) are detected on a level which I can't access (at least that's what my research told me so far). – tobyUCT Jul 07 '15 at 08:00
  • 1
    Did you try this? http://stackoverflow.com/questions/2661536/how-to-programatically-take-a-screenshot-on-android – TDG Jul 07 '15 at 08:02
  • Unfortunately the suggested answers in this thread either require root access (which I will not have) or don't work (both drawingCache and Canvas result in black rectangles). – tobyUCT Jul 07 '15 at 08:33
  • Does anyone know how to solve this now? – NeoWang Nov 05 '17 at 18:02

0 Answers0