I have checked out many discussions on stackoverflow & other forums about programatically taking a screenshot of a surfaceview in android like the one below.
Taking screen shot of a SurfaceView in android
But, we'r facing a unique problem as it looks. We are drawing a line on a canvas of a surfaceview using the api canvas.drawline(). But when we use the example code provided in the numerous to take a screenshot of the surfaceview then the line is missing on the screen capture. The line drawn on the canvas is required as a part of the screen capture.
Basically, we are enabling the cache, building the cache & get the cache of the view like in the below link.
www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0CD0QFjAC&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F12724237%2Ftaking-screen-shot-of-a-surfaceview-in-android&ei=Xy0SUv3oOpDNrQfDmIHoAQ&usg=AFQjCNFNQA8PinYhqSA9z-Nt44kqzTtT-A&sig2=Kcvzw5j3wKXliC0EzzLd9Q&bvm=bv.50768961,d.bmk&cad=rja
Is it not correct. Can anyone kindly suggest? Thanks in advance.