Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I stop monitor ? back to mirror mode #28

Open
minh-dai opened this issue May 19, 2022 · 1 comment
Open

How can I stop monitor ? back to mirror mode #28

minh-dai opened this issue May 19, 2022 · 1 comment

Comments

@minh-dai
Copy link

No description provided.

@hongquang198
Copy link

hongquang198 commented Oct 23, 2023

You can do it like this:

 private var currentPresentation: PresentationDisplay? = null
           "dismissPresentation" -> {
               try {
                   currentPresentation?.dismiss()
                   result.success(true)
               } catch (e: Exception) {
                   result.success(false)
               }
           }
           "resumePresentation" -> {
               try {
                   currentPresentation?.show()
                   result.success(true)
               } catch (e: Exception) {
                   result.success(false)
               }
           }

The Presentation class has a dismiss() function if you call it in this package it will go back to mirror display mode
Have a look at my forked repo pull request you'll see
https://github.com/hongquang198/presentation-displays/pull/1/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants