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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebBrowser][Linking] WebBrowser with Linking listener not returning event data on Android on both Standalone & Expo Client #5555
Comments
same here |
Is this happening in the Expo Client, a standalone app, or both? |
@cruzach I have only tested this in the Expo client |
I have just built and tested this in a standalone Android app and it is also failing. |
same here |
As per documentation:
This means, that on Android promise resolves immediately after browser is opened. We are unable to determine moment when browser is closed, due to platform limitations. You might want to consider binding registration and unregistration of listener to some component lifecycle, or unregister it when handling lisntener's callback. NOTE: |
Hi @mczernek, thanks for looking into this issue. This does work in Expo v32 for Android. If support is no longer available please can you provide a more detailed workaround? |
It does, since we changed WebBrowser API in Expo 33. This change was enforced by migrating into much more powerful CustomTabs in WebBrowser module. |
As mentioned in my first answer, you cannot invoke You should either unregister it when handling listener's callback, or have some other condition for unregistering. Whichever fit's your case. |
The updated example still fails in Expo 35 so I'll see if I can fix it based on your feedback and submit a PR, unless this is something that you are able to assist directly with? |
PR is more than welcomed, I highly encourage you to submit one! If for some reason you won't be able to make one, I'll do it :) |
@WolfyUK I've created an issue in examples repo. Feel free to refer to it in your PR. |
馃悰 Bug Report
Environment
Targets: iOS, Android
Steps to Reproduce
expo-template-blank-typescript
templateWebBrowser
withLinking
listeners and a button to launch the browserLinking.makeUrl()
generated URIExpected Behaviour
Listener should be called on Android device after deep link used to close the browser and return to the app with
event
data.Actual Behaviour
Listener function is not called when running on Android device. This works fine on iOS.
Reproducible Demo
See this repo which contains a sample backend as well as Expo project.
The same behaviour is also observed in a bare workflow Expo project using custom deep links.
WebBrowser Redirect Example
The example against expo v32 as found here seems to work fine, and is basically the same as the repro above. I have forked this and changed to expo v34 here which also fails to return the expected data for Android.
The text was updated successfully, but these errors were encountered: