Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Not working with PhoneGap Build for Android? #124

Closed
blukis opened this issue Aug 26, 2017 · 4 comments
Closed

Not working with PhoneGap Build for Android? #124

blukis opened this issue Aug 26, 2017 · 4 comments

Comments

@blukis
Copy link

blukis commented Aug 26, 2017

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
Copy link
Author

blukis commented Sep 5, 2017

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
Copy link

ghost commented Sep 7, 2017

Any luck with this @blukis ?

@blukis
Copy link
Author

blukis commented Sep 7, 2017

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
Copy link
Contributor

👋 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.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants