Add deep linking to cordova app
Asked Answered
P

4

20

I would like to enable App Indexing for my cordova android app as explained here: https://developers.google.com/app-indexing/webmasters/app

Unfortunately I can't find documentation how to do that for a cordova app. There is a plugin to listen and broadcast to Intents, but I don't think this will help me in this case: https://github.com/Initsogar/cordova-webintent

I tried to add the example XML (modified with my data) to the config.xml file, but when I try to build the app I get the following error:

error: Error parsing XML: unbound prefix

This error disappears when removing the android: prefixes within the XML, but it isn't working.

Pneumatology answered 21/4, 2015 at 15:6 Comment(5)
Phonegap Build has a method to add XML elements to the final AndroidManifest.xml It is called gap:config-file docs.build.phonegap.com/en_US/…Exarch
Is the question related to this discussion on the dev list? callback.markmail.org/thread/e6fkurnkisekwgmuDehart
yes, looks like it I think this plugin might be of help: github.com/nordnet/cordova-universal-links-pluginPneumatology
@Riesling, have you tried that plugin? If it worked you can answer to your own question to make it more visible to the people (the question is high rated).Dehart
Possible duplicate of How to provide and handle deep links in cordova / phonegap applicationsQuiescent
C
1

I have looked into this before and there are some problems with Google App Indexing and Cordova Applications. Since Cordova, by design, works in a single web view, there is not much to index - the App Indexing feature will just wonder why you are staying in one view all the time.

Somebody needs to implement a plugin for this, to simulate all the views, and you would still need to make some calls from Javascript. Android simply does not know how the App is structured behind the Web View.

What might help is to add some Intents so your App can be started in response to some links on your website or links eg in an email or web browser with a special yourapp:// protocol. But I am not sure if google will index content in an InAppBroser anyhow.

I am using this plugin to get the url opening functionality https://github.com/EddyVerbruggen/Custom-URL-scheme

I myself am looking for a solution, so if somebody else has a better answer I would be happy to upvote it.

Coleman answered 7/12, 2015 at 18:52 Comment(1)
In my case I'm loading a mobile site within the inappbrowser (the app is just a wrapper to add some additional features like push notifications), therefore I don't have this problem.Pneumatology
P
1

With this plugin I got it implemented successfully:

https://github.com/nordnet/cordova-universal-links-plugin

You need to add it to your project and then configure you're sites via <link rel="alternate" href="" /> elements in a config file. Then you can add some additional markup to the sites, which should be indexed, to help Google finding the right links. The documentation is good.

Pneumatology answered 19/1, 2016 at 7:27 Comment(0)
J
0

wrote a little plugin for it: https://github.com/eneskaya/google-app-indexing-cordova

The first step still remains to enable deeplinking to your app though! I recommend https://github.com/EddyVerbruggen/Custom-URL-scheme

Have fun! Enes

Jeremiahjeremias answered 28/7, 2016 at 13:52 Comment(0)
Q
-1

cordova-plugin-firebase-appindexing plugin helps to index your app in google.

You can index the app pages with meta tags as mentioned here.

Plugin helps to search your app pages in google search application in Android app. If you search for app pages it comes in auto complete and on click of search result it takes directly to your app page.

https://www.npmjs.com/package/cordova-plugin-firebase-appindexing

Quadrinomial answered 22/12, 2016 at 11:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.