gitawego / cordova-screenshot

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

Support screenshot for crosswalk #74

Closed fujunwei closed 8 years ago

fujunwei commented 8 years ago

@gitawego PTAL, thanks.

gitawego commented 8 years ago

there is a conflict of merge, i'm gonna do it asap (when i have time). sorry

fujunwei commented 8 years ago

Thanks, done.

gitawego commented 8 years ago

thanks for your help :)

zarko-tg commented 8 years ago

@fujunwei, @gitawego,

I tested this and the callback of navigator.screenshot.save never executes.

The test environment was:

Not using Crosswalk is fine - my test code/app runs as expected and the screenshot image is saved in storage.

gitawego commented 8 years ago

@zarko-tg yes, indeed, it doesn't work, because the latest crosswalk plugin with onmessage feature is not yet published. I just tagged version v0.1.4, please use this one. I'm gonna update the code. sorry for this.

zarko-tg commented 8 years ago

No rush, I was just experimenting. So now I was about to check against master of cordova-plugin-crosswalk-webview to see cordova-screenshot finally in action but not luck... cordova-plugin-crosswalk-webview has some new (build) issue unrelated to your own plugin. Will get back here as soon as things stabilize again.

Thanks

fujunwei commented 8 years ago

You need to wait Crosswalk-18 to release or try it manually following below steps.

The master branch of crosswalk plugin is based on crosswalk-18 that is canary version, you can get it from https://download.01.org/crosswalk/releases/crosswalk/android/canary/18.46.471.0/crosswalk-18.46.471.0.aar, and then install it in local maven

mvn install:install-file -DgroupId=org.xwalk -DartifactId=xwalk_core_library_canary \
      -Dversion=18.46.471.0 -Dpackaging=aar  -Dfile=crosswalk-18.46.471.0.aar \
      -DgeneratePom=true

Modify config.xml to use the canary AAR

<preference name="xwalkVersion" value="org.xwalk:xwalk_core_library_canary:18.46.470.0" />

Add mavenLocal() to **-xwalk.gradle file

repositories {
  maven {
    url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
  }
  mavenLocal()
}

You can also track this issue https://crosswalk-project.org/jira/browse/XWALK-2233, thanks.

zarko-tg commented 8 years ago

I can confirm that it works now that Crosswalk 18 has been released in their beta channel.