Tuesday, 28 May 2019

Cordova Android not allowing to open whitelisted intent to fb-messenger

I have an Ionic Cordova app for android which has a button to facebook messenger:

<a href="https://m.me/my-fb-page" target="_blank"><img src="assets/images/messenger.svg" /></a>

When tapped, nothing appears on the screen. I keep receiving this error through logcat:

CordovaWebViewImpl: Blocked (possibly sub-frame) navigation to non-allowed URL: intent://user/xxxxxxxxxxxxx/?intent_trigger=mme&nav=discover#Intent;scheme=fb-messenger;package=com.facebook.orca;end

I have cordova-plugin-whitelist installed.

Content of config.xml:

    ...
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-navigation href="*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-intent href="fb-messenger:*" />
    <platform name="android">
        <allow-intent href="market:*" />
        <allow-intent href="fb-messenger:*" />
        ...

I have tried a number of options for allow-intent, access and allow navigation.

The issue is not specifically related to facebook messenger, I have problems with opening other external (payment) apps as well



from Cordova Android not allowing to open whitelisted intent to fb-messenger

No comments:

Post a Comment