Skip to content

feat(browser): Add close() method for android #151

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

Closed
wants to merge 1 commit into from

Conversation

galaharon11
Copy link

I'm new to ionic and capacitor and I had a problem I couldn't solve: Browser cannot be closed on android. I found out that you can't close CustomTabs on android. After searching for a while, I found out an optional workaround for that problem (based on an this answer on StackOverflow: https://stackoverflow.com/a/41596629/5976838).
The workaround works perfectly for me so I uploaded it here.

I'm new to ionic and capacitor and I had a problem I couldn't solve: Browser cannot be closed on android. I found out that you can't close CustomTabs on android. After searching for a while, I found out an optional workaround for that problem (based on an this answer on StackOverflow: https://stackoverflow.com/a/41596629/5976838).
The workaround works perfectly for me so I uploaded it here.
@imhoffd
Copy link
Contributor

imhoffd commented Dec 22, 2020

Hi @galaharon11, would you be able to run npm run fmt to reformat the Java so CI passes?

@imhoffd imhoffd requested review from carlpoole and ikeith December 22, 2020 00:31
@jcesarmobile jcesarmobile changed the title Added Browser.close() for android feat(browser): Add close() method for android May 18, 2021
@sathishsundar05
Copy link

@galaharon11 your solution is working thanks but,

Missed to add the below imports,

import android.content.Intent;
import android.content.Context;

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

Successfully merging this pull request may close these issues.

3 participants