Answer the question
In order to leave comments, you need to log in
How to activate screenshot plugin on Phonegap?
Good day.
I recently started developing on phonegap and in the application I conceived, to save the results, you need to take a screenshot of the screen. I searched a lot of resources in search of a solution to this problem and found a plugin for phongap, which makes it possible to take a screenshot at the touch of a button. But there was a problem with understanding how to install it, connect it and bring it into working condition.
The application is conceived for Android and iOS.
Here is the plugin itself: plugins.cordova.io/#/package/com.blackberry.commun...
It seemed to be possible to install it, I did it with the command indicated there:
$ cordova plugin add com.blackberry.community.screenshot
<img id="myimage" />
// configure options
var options = {dest:'data:', mime:'image/png'};
// perform screenshot
var screenshot = community.screenshot.execute(options);
// check result
if(screenshot.substr(0,5)=="data:")
$('#myimage').attr('src', screenshot)
else
alert(screenshot);
Answer the question
In order to leave comments, you need to log in
The plugin is only for blackberry, don't you notice the catch?
You will have to implement the plugin yourself using Java and Objective-c.
There is a library for Anroid: https://code.google.com/p/android-screenshot-library/
for iOS - stackoverflow.com/questions/2200736/how-to-take-a-...
the phonegap documentation describes how to write plugins. Go ahead.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question