Skip to content

Cannot take screenshot for platform-views by using RepaintBoundary? #25306

Closed

Description

@zhaoya188

Steps to Reproduce

  1. run demo from webview_flutter
  2. take screenshot by using RepaintBoundary.
  3. get image:

flutter analyze

Analyzing flutter_app...
No issues found! (ran in 1.9s)

flutter doctor -v

[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.13.6 17G3025, locale zh-Hans-CN)
    • Flutter version 1.0.0 at /Users/zhaoya/zy/dev/flutter
    • Framework revision 5391447fae (13 days ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/zhaoya/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ ideviceinstaller is not installed; this is used to discover connected iOS devices.
      To install with Brew, run:
        brew install --HEAD usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] IntelliJ IDEA Community Edition (version 2016.2.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins
    ✗ This install is older than the minimum recommended version of 2017.1.0.

[✓] Connected device (1 available)
    • Robin • NBQGLMB612601533 • android-arm64 • Android 7.1.1 (API 25)

Activity

  1. goderbauer commented on Dec 13, 2018

    @goderbauer
    Member
  2. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    engineflutter/engine related. See also e: labels.
    on Dec 13, 2018
  3. added this to the milestone on Dec 13, 2018
  4. SeanningTatum commented on Mar 6, 2019

    @SeanningTatum

    Is there any progress on this? I'm also experiencing the same issue.

  5. amirh commented on Mar 6, 2019

    @amirh
    Contributor

    @SeanningTatum I suggest you thumb up the issue if it affects you as well so it comes up when prioritizing.

  6. SeanningTatum commented on Mar 10, 2019

    @SeanningTatum

    @amirh I think you should add the platform-ios tag too, I experienced this in iOS.

  7. amirh commented on Mar 10, 2019

    @amirh
    Contributor

    @SeanningTatum on iOS it's a different issue (it wasn't implemented yet) the tracking issue for that is #23435

  8. juliengit2 commented on Sep 6, 2019

    @juliengit2

    same issue for us and very annoying, any progress ?

  9. added
    customer: crowdAffects or could affect many people, though not necessarily a specific customer.
    on Mar 12, 2020
  10. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  11. 20 remaining items

  12. yukitaka13-1110 commented on Feb 5, 2021

    @yukitaka13-1110

    Any progress?

  13. Aperico-com commented on Feb 11, 2021

    @Aperico-com
  14. mrmodh10 commented on Feb 11, 2021

    @mrmodh10

    Well, I know this may be a controversial suggestion, but the flutter_inappwebview is an alternative plugin which currently support taking screenshots (takeScreenshot function). While this isn't prioritized, it may be reasonable to use this alternative plugin if this functionality is essential for your application (like it was for me).

    yes i know it is alternative plugin but using that plugin i can not take screenshot of current state, for example in webview i am drawing something and then i want to take screenshot with drawing ,which is not happening using [flutter_inappwebview].

  15. delay commented on Mar 9, 2021

    @delay

    Could you expose this feature from the WkWebview api on iOS. It has takeSnapshot and createPDF options.
    https://developer.apple.com/documentation/webkit/wkwebview

  16. dayron9110 commented on Mar 31, 2021

    @dayron9110

    News? is there any way to take screenshots of webview content?

  17. delay commented on Apr 1, 2021

    @delay

    The only way that I think this might work is to create a javascript channel and insert something like this. https://html2canvas.hertzen.com/ I haven't tested this yet but its the only idea I have to get around this problem until flutter adds it to the webview.

  18. blasten commented on May 21, 2021

    @blasten

    This is a limitation of platform views at the moment. The current workaround on Android is to use the Espresso framework. I don't have an example I can share at the moment, but internal teams at Google have done this successfully when using hybrid composition.

  19. s20797 commented on Jun 10, 2021

    @s20797

    Is there any progress on this? I'm also experiencing the same issue.

  20. s20797 commented on Jun 10, 2021

    @s20797

    Any progress?

    same problem use in apple_map_flutter

  21. s20797 commented on Jun 10, 2021

    @s20797

    any way for apple_map_flutter

  22. blasten commented on Jun 10, 2021

    @blasten

    The Flutter team will be working on this feature this quarter. You can follow progress on #83856.

  23. github-actions commented on Jul 31, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  24. locked as resolved and limited conversation to collaborators on Jul 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: imagesLoading, displaying, rendering imagesa: platform-viewsEmbedding Android/iOS views in Flutter appsc: renderingUI glitches reported at the engine/skia or impeller rendering levelcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.engineflutter/engine related. See also e: labels.found in release: 1.20Found to occur in 1.20found in release: 1.25Found to occur in 1.25frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions