-
Notifications
You must be signed in to change notification settings - Fork 124
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
Fix/communication between app and overlay #96
base: main
Are you sure you want to change the base?
Fix/communication between app and overlay #96
Conversation
5225d5a
to
7d55a19
Compare
i will verify it and try to merge it ASAP |
c5f99e5
to
81bba40
Compare
I force-pushed a fix for the last commit. Now, it should work as intended. If the overlay is being shown, and [showOverlay] is called, the overlay will reopen. Before the force-pushed fix, it would have just been closed. |
a7c4254
to
7fff772
Compare
I have updated implementation of messaging between the app and the overlay. It has the following main improvements:
@pragma("vm:entry-point")
And now, the overlay can receive and react to events from the main app even when it's not attached to the view (closed from the user's perspective). For example, consider this situation:
After this action [counter] will be increased by 1. This change in behavior can be considered a "fix", but theoretically, it could unexpectedly alter plugin behavior for some users. Update:
|
4174ffe
to
a861816
Compare
I'm unable to get data from overlay to flutter UI. I can send data from ui to overlay |
Can you test this sample app and tell if it works? If the sample app works, the following information can be helpful:
If the sample app does not work, the following information can be helpful:
Providing a minimal reproducible example would be helpful for further investigation. |
@serhiisdev Thanks a lot for your response. I use example of |
@serhiisdev I tried example you ask but I'm only getting data on overlay side from flutter side. I've never get print MainAppScreen Event from overlay: |
@irfansadiqdevops I have tested app on both Android 14 (sdk 34) and Android 9 (sdk 28) using Android emulator and Flutter 3.16.1, and communication worked both ways. Can you provide following information:
" Because flutter_overlay_window_sample_app requires SDK version >=3.2.6 <4.0.0, version solving failed.
to this:
And tell what is the output to console: 'isSent: true' or 'isSent: false' ? |
@serhiisdev I've update flutter sdk to 3.16.9 and your code, It works. Thanks a lot |
be99a7b
to
e825131
Compare
can you rebase from the latest version so I could verify the communication overlay and merge it thanks |
73f852b
to
e6ec0e6
Compare
cache and reuse flutter engine group
cleanup resources on detaching from activity ensure FlutterEngine is created before attempting to launch overlay
…sent using the [shareData] method doc improve documentation for [shareData] method feat return the original Future from the [disposeOverlayListener] method
…thod feat return non-nullable value from [shareData] method doc update documentation for [shareData] method
e6ec0e6
to
fb0a426
Compare
Done |
Has there been any progress on this pull request? |
Sorry I didn't verify it yet I need to test it otherwise you can use this MR directly |
I can't get the data I sent from Overlay |
when i build with cable works fine but when i build with apk or appbundle |
Fix communication between app and overlay.
Cache and reuse FlutterEngineGroup and FlutterEngine.
Fix crash when closing overlay.
Now there is no need to use ReceivePort or SendPort to communicate with the overlay. Just [FlutterOverlayWindow.overlayListener] and [FlutterOverlayWindow.shareData] will be enough.
for example: