gitawego / cordova-screenshot

screenshot plugin for cordova/phonegap
Other
211 stars 167 forks source link

Synchronous version of getScreenshotAsURI function #114

Closed aik9508 closed 6 years ago

aik9508 commented 7 years ago

I add the synchronous version of getScreenshotAsURI function in Android.

The situation is that I want to use the plugin to realize page transition animation in my application. To do this, I take a screenshot before leaving the current page and stock the uri of the screenshot in a variable for future use. The problem is that for some reason, I can't pass the page change code as a callback function for navigator.screenshot.URI. So sometimes the page has already changed before the screenshot is taken. In order to overcome this problem, I add a synchronous version of getScreenshotAsURI.

gitawego commented 6 years ago

thx for your help