nordnet / cordova-universal-links-plugin

[DEPRECATED] - Cordova plugin to support Universal/Deep Links for iOS/Android.
https://github.com/nordnet/cordova-universal-links-plugin/issues/160
MIT License
349 stars 530 forks source link

Not working with PhoneGap Build for Android? #124

Closed blukis closed 6 years ago

blukis commented 7 years ago

I cannot get this plugin to work using PhoneGap Build for Android. The discussion in this open issue relating to iOS seems to indicate getting it working for Android might be less problematic than for iOS. Since that question & discussion related specifically to iOS, opening a new issue/question here for Android.

Is there a PGB workaround that works for Android?

(There's some discussion in the above issue about altering the AndroidManifest.xml using Cordova/PGB <config-file> tags, but I'm not sure what actually needs to be changed there for this plugin to work.)

blukis commented 7 years ago

OK, after (finally!) getting local cordova working to compare, and some trial-and-error, I can get this plugin partly working with PhoneGap Build with these additions to the config.xml:

<config-file platform="android" parent="/manifest/application" mode="merge">
    <activity android:launchMode="singleTask" />
</config-file>

<config-file platform="android" target="AndroidManifest.xml" parent="/manifest/application/activity[1]" mode="add">
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" android:host="MYDOMAINHERE" android:path="/MYPATHHERE" />
    </intent-filter>
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="https" android:host="OTHERDOMAINHERE"/>
    </intent-filter>
</config-file>

However, while links now trigger the app to open, the universalLinks.subscribe() callback doesn't seem to fire (neither with the default event, or with custom events). (As was mentioned already here, we need a way to tell the plugin about which events to fire, and PGB apparently strips the tag from the config.xml.)

@nikDemyankov - you mentioned a "ul.json" type solution in issue 28. Is this something that is implemented for Android, or could be?

ghost commented 7 years ago

Any luck with this @blukis ?

blukis commented 7 years ago

Nope. I'm hoping someone smarter than me can help fill in there gaps I left above. :)

I think the "ul.json" type solution discussed in the other issue would do the trick, but was unclear from that discussion whether that was ever implemented for Android. (Looks like they were trying it in iOS, then ran into some iOS-specific showstoppers?)

nordnet-deprecation-bot commented 6 years ago

👋 Hi! Thank you for your interest in this repo.

đŸ˜ĸ We are not using nordnet/cordova-universal-links-plugin anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹī¸ Please see #160 for more information.