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.
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 ofgetScreenshotAsURI
.