EddyVerbruggen / cordova-plugin-safariviewcontroller

:tiger: :elephant: :crocodile: Forget InAppBrowser for iOS - this is way better for displaying read-only web content in your PhoneGap app
MIT License
282 stars 144 forks source link

Android 11 package visibility #180

Open ucsbricks opened 3 years ago

ucsbricks commented 3 years ago

Implemented fix discussed in #179. Tested and is working fine on my devices and emulators.

See https://developer.android.com/training/package-visibility for details.

ldgfb commented 3 years ago

Thanks for sharing this fix. Would be great to get this merged; without it this plugin is broken on Android 11.

slissner commented 3 years ago

As November 2021 deadline is approaching, any possibility to get this merged soon? Thank you very much!

SrPatinhas commented 3 years ago

Is there any ETA to merge this PR and publish a new version? with the Android 12 coming out a 4th October, this will be a needed fix for any smartphone that uses Google Chrome as default browser.

ucsbricks commented 3 years ago

@EddyVerbruggen could you please have a look on this PR and merge it? Thanks.

alexneats commented 2 years ago

Agreed. This fix is great because, it works! I would LOVE for v2.0.1 of this plugin to get pushed out soon too, please! (:

slissner commented 2 years ago

I have merged this pull request into my forked repository: https://github.com/slissner/cordova-plugin-safariviewcontroller/pull/1

Herewith I can confirm that the changes have worked with a real Pixel 5 Android 12 device.

Update: tried with simulator Pixel 5 Android 11 (API v30) device: It did not work.

slissner commented 2 years ago

For those who try to test this pull request in a android simulator device: Make sure you have at least one browser (e.g. chrome) installed on your virtual device that supports the custom tabs functionality.

Background:

As mentioned in my previous comment, the custom tabs did not work on my simulator device. The problem was that by default no browser at all was installed on that device. After installing chromium, it worked well.

Where is Custom Tabs available?

Custom Tabs is a feature supported by browsers on the Android platform. It was originally introduced by Chrome, on version 45. Currently, the protocol is supported by most Android

Source: https://developer.chrome.com/docs/android/custom-tabs/#where-is-custom-tabs-available

How to install chrome on for an android emulator:

WuglyakBolgoink commented 2 years ago

@slissner

Update: tried with simulator Pixel 5 Android 11 (API v30) device: It did not work.

but it open WebView Modal

image

WuglyakBolgoink commented 2 years ago

as a fallback fix you can use my plugin

https://github.com/WuglyakBolgoink/cordova-plugin-quick-fix-svc