Device.saveScreenshot added to PhoneGap

One of the integral features of the next application I’m releasing (I’ll write a post about it soon, honest) is the capability of saving a copy of the user’s work in my app to their Photo Library. For a while now I’ve been wanting to be able to save screenshots from within PhoneGap for two main reasons:

  1. Be able to export the user’s work and allow them to email it, import it into other applications, etc.
  2. Save a screenshot to their splash-screen image, that way when the application restarts it shows their previous state while they wait (for example, the Notes application on the iPhone).

I’ve implemented #1 right now, meaning with a simple non-blocking call you can save the current view to the photo library. In the future I’ll add another three options: Save to the default splash-screen image, save to a file, and save and upload to a remote location.

Check out the check-in I’ve made and if you have any comments, please let me know!

1 thought on “Device.saveScreenshot added to PhoneGap”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.