0

I'm building an Android mobile application using HTML, CSS and JavaScript (jQuery) which will be compiled using Phonegap.

Is there any way to take a screenshot of everything on the screen at that moment and store it on your phone?

Many thanks

jcrowson
  • 4,290
  • 12
  • 54
  • 77
  • 1
    This can't be done with HTML, CSS, or JS. So it would have to be achieved by something that Phonegap offers, or by directly communicating with the Android OS – maxedison Nov 09 '11 at 13:27
  • Yes, This cannot be done by these technologies.. You may have to use android API to achieve this. Here is the post discussing the same..http://stackoverflow.com/questions/3067586/how-to-capture-the-android-device-screen-content – Exception Nov 09 '11 at 14:07

2 Answers2

1

I actually solved this by creating my own plugin for PhoneGap.

https://github.com/jcrowson/Android-Phonegap-Screenshot-Plugin

It uses Android native Java code to capture the WebView.

jcrowson
  • 4,290
  • 12
  • 54
  • 77
0

This is not exactly what you are asking for, but it might help:

Using an app like ScreenShotUX (which I have used minus paying) from here, the user can merely shake the phone while in your app, and the app can fetch the screenshot from a defualt location like /mnt/sdcard/ScreenCapture/

With the screen shot taken for you, you can then use PhoneGap and javascript to read it, and probably even send it to a server. (see this plugin here for using phonegap to read form sdcard)

Might be easier than what you are asking for.

Waynn Lue
  • 11,344
  • 8
  • 51
  • 76
JWL
  • 13,591
  • 7
  • 57
  • 63