capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

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

Open galaharon11 opened this issue 5 years ago • 2 comments

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.

galaharon11 avatar Dec 21 '20 09:12 galaharon11

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

imhoffd avatar Dec 22 '20 00:12 imhoffd

@galaharon11 your solution is working thanks but,

Missed to add the below imports,

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

sathishsundar05 avatar Jul 25 '21 19:07 sathishsundar05