Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Screen shot plugin for Cordova / PhoneGap

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 259
    Comment on it

    Hello Readers,

    Today's post is about we can capture screen shots in our Cordova / phoneGap application.

    Well !  This Screenshot plugin provides the functionality that we can capture the screen shot of current screen and save it into device storage.

     

    First of all we need to install plugin via Cordova CLI :

     

    $ cordova plugin add https://github.com/gitawego/cordova-screenshot.git

     

    Important : For iOS application this plugin supports only jpg format.

     

    As i said, we can capture the screen shot of the current screen and also we can save screen shot into device storage.

     

    Usage:

    navigator.screenshot.save(function(error,res){
      if(error){
        console.error(error);
      }else{
        console.log('Screen shot saved into your device.',res.filePath);
      }
    });

     

    In the above example navigator.screenshot.save  method take screen shot of screen and save it to the mobile storage.

     

    For more details visit: screen shot plugin for cordova / phonegap application

     

    Hope this will help you :)

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: