Skip to content
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

documenting the custom schemes handling #356

Open
boynet opened this issue Nov 27, 2018 · 4 comments
Open

documenting the custom schemes handling #356

boynet opened this issue Nov 27, 2018 · 4 comments

Comments

@boynet
Copy link

boynet commented Nov 27, 2018

I am not native english so I cant create a pr for this, but we need to documente the lastest changes in custom schemes handling (#263 and #274)

the things to document:
for example to allow whatsapp custom scheme and twitter

  • add new config.xml preference with the custom schemes you want to support:
<preference name="AllowedSchemes" value="whatsapp,twitter" />`
  • add event listeners customscheme:
inAppBrowserRef.addEventListener('customscheme', function (event) {
            //do whatever you want here like:
             window.open(event.url, "_system");
        });
@janpio
Copy link
Member

janpio commented Nov 27, 2018

Thanks @boynet, seems like a reasonable thing to do. Where would you put those in the README/documentation? Feel free to open a new PR even with imperfect English, we can iterate on the wording with suggestions and comments!

@engharb

This comment has been minimized.

@intodevelopment
Copy link

Thanks for mentioning this here. It would be nice if this was added to the documentation, because, to my knowledge, it appears to be the only way on Android to handle redirects back to the app using a custom url scheme. I've used this for the Adyen and Okta oAuth redirect.

@Heshyo
Copy link

Heshyo commented Oct 23, 2021

As @boynet commented #263 (comment) , this works the 1st time a customscheme is opened. The following times, the callback is never called. This is linked to https://issues.apache.org/jira/browse/CB-13198 and the fix is simple: add the customscheme event to the _system InAppBrowser after opening it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants