e-imaxina / cordova-plugin-deeplinks

Cordova plugin to support Universal/Deep Links for iOS/Android.
MIT License
33 stars 68 forks source link

How to use plugin / event in cordova.. #22

Open wa05 opened 4 years ago

wa05 commented 4 years ago

Hi, I can't listen to the event

<widget id="com.mundoit.rosganet" version="1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
 <universal-links>
        <host name="rosganet.com" scheme="https">
            <path event="ul_myExampleEvent" url="/comprar/*" />
        </host>
        <host name="*.rosganet.com" scheme="https">
            <path event="ul_myExampleEvent" url="/comprar/*" />
        </host>
    </universal-links>
</widget>
if (window.universalLinks || window.cordova.universalLinks || 
       window.cordova.plugins.universalLinks) {
      console.log('working')
}

It never reaches the console.log() ..

textsteph commented 4 years ago

I'm having the same issue with iOS, but not with Android - the link is correctly followed into the app, however the subscribe events don't seem to be called?

chinieer commented 4 years ago

I'm having the same issue with iOS, but not with Android - the link is correctly followed into the app, however the subscribe events don't seem to be called?

same issue

CosimoSguanci commented 4 years ago

Hi, I can't listen to the event

<widget id="com.mundoit.rosganet" version="1.2" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
 <universal-links>
        <host name="rosganet.com" scheme="https">
            <path event="ul_myExampleEvent" url="/comprar/*" />
        </host>
        <host name="*.rosganet.com" scheme="https">
            <path event="ul_myExampleEvent" url="/comprar/*" />
        </host>
    </universal-links>
</widget>
if (window.universalLinks || window.cordova.universalLinks || 
       window.cordova.plugins.universalLinks) {
      console.log('working')
}

It never reaches the console.log() ..

Simply using universalLinks without window / window.cordova usage worked for me. Simply copy and paste the example.