-
Notifications
You must be signed in to change notification settings - Fork 615
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
feat: provide a workaround for Browser.close() on android #50
Comments
BTW: I know that the android implementation uses chrome custom tabs and this does not provide a close functionality. However, there seems to be a workaround by using broadcasts and redirect to the activity, that opened the chrome custom tab. Maybe this solution could be used: https://gist.github.com/im182cm/2c7723d42b2d7091af6c493b97b732b7 |
Any news? |
Any news on this ? |
Any news on this issue? |
1 similar comment
Any news on this issue? |
We could do with this too - any update? |
Not being able to close the browser is a huge issue. Please, could you make it number one priority for this project? Thank you. |
My workaround was to use Observables. I turned the Browser.open() into an observable with from and pipe takeUntil with a void Subject to cancel the observable. Worked on Android but not iOS for me |
That sounds promising. Do you have an example? |
The workaround I'm using (on Android at least) is cordova-plugin-browser instead of cordova-plugin-inappbrowser and then simply use the new browser "Close" ('X') feature. |
@cyrilfr Sure, this is a simplified example but it's something along those lines:
I work with Ionic/Angular, i don't know how it would look like with React and Vue. |
What version of Capacitor are you using? I tried with this code but that didn't work:
|
It looks like there's a PR that has addressed this issue and it simply needs to have some formatting updated so that it'll pass linting. If there's anybody that has submitted PRs to Ionic before and knows the protocol for taking over the PR and getting it across the finish line. |
Any updates on this? It's been 8 months since the PRs were opened... Thanks! |
I would also love to have this PR merged! |
It would be great if this PR could be completed! |
It is absolutely necessary to close the browser in case of auth redirections or they will not work within the web view. |
Its' been 3 years now, this is an absolutely necessary feature of this plugin. |
We need an answer if this will be completed or not! Thank you |
Any update on the PR ?? |
Meeeeeeeeerge please |
I'm using patch-package in the interim to automate the patch as part of the build. |
Really? Ionic team. 4 years in the making, and you do not have an answer or direction to this? |
It's another PR was merged. Just try latest version, it should work fine in Android as well. |
I can confirm it's working on Android, so this ticket can be closed. Only the documentation needs to be updated (it still says "no-op on other platforms") |
There's a PR for that 😄 |
closing since it's been supported since the release of |
Feature Request
Provide a workaround for Browser.close() on android, in order to provide the same features on all platforms.
Description
As i understand it, capacitors goal is to provide the same api and features on all platforms (wherever possible). This currently seems to be not the case with the Browser plugin, as Browser.close() does not work on android (also documented). For me, this makes the plugin pretty much unusable, as i build my app for ios and android...
Currently i have to use cordova-plugin-inappbrowser, which is not a preferable solution. It would be very nice, if we could solely rely on capacitor to do this :)
Platform(s)
android
Preferred Solution
Provide a workaround for Browser.close() on android
Alternatives
Use cordova-plugin-inappbrowser (not really a preferable solution)
The text was updated successfully, but these errors were encountered: