Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add deep linking to cordova app

Tags:

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.

like image 208
Riesling Avatar asked Apr 21 '15 15:04

Riesling


People also ask

Can you deep link into an app?

Passing search data via deep linkingDevelopers will need to submit their app and deep linking apps on both iOS and Android to be indexed by Google. Alternatively, developers can use Google's short links to deep link mobile app users if the app is installed and direct others to the webpage.

How do I integrate a deep link app on Android?

First, you specify the BROWSABLE category so your deep link can work in a browser. Without it, clicking the deep link on a browser won't resolve to your app. Second, the DEFAULT category lets your app handle implicit intents. If it's missing, the intent must specify the app component name for the activity to start.


1 Answers

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.

like image 85
Paul Weber Avatar answered Sep 25 '22 17:09

Paul Weber