简体   繁体   中英

I don't fully understand app indexing

Okay, so I get that if I have a website and an app that roughly displays the same content, app indexing can be used to open links to the website in the app instead (if the user has it installed).

To do this, one specifies deep links in the web pages that specify a URI to the app and the content. This also lets Googlebot know about the webpage-to-app-intent connection so it can display stuff in search results, etc (ie indexing ). One can also specify intent-filters that handle website URL's, so links to your website can automatically open the app and display the content there, without even opening the webpage in a browser.

The part that I'm having problem understanding is that in an android app you add code (which can be automatically generated by Android Studio) that "goes the other way".

For example

@Override
public void onStart() {
    super.onStart();

    // ATTENTION: This was auto-generated to implement the App Indexing API.
    // See https://g.co/AppIndexing/AndroidStudio for more information.
    client.connect();
    Action viewAction = Action.newAction(
            Action.TYPE_VIEW, // TODO: choose an action type.
            "Main Page", // TODO: Define a title for the content shown.
            // TODO: If you have web page content that matches this app activity's content,
            // make sure this auto-generated web page URL is correct.
            // Otherwise, set the URL to null.
            Uri.parse("http://host/path"),
            // TODO: Make sure this auto-generated app URL is correct.
            Uri.parse("android-app://com.magnuswikhog.adrlibrary/http/host/path")
    );
    AppIndex.AppIndexApi.start(client, viewAction);
}

So what is the purpose of this code? This seems to go the other way compared to the website-to-app-intent, and I don't really understand why you'd need to do that? If I only implement deep-linking and handling URL-intents, users will be able to open the app instead of the webpage, no need for AppIndex .

Is it mostly a way for Google to gather statistics for how users of the app are using screens that have a corresponding webpage? If so, what impact does this have? Does it affect app ranking (and/or website ranking?) Is it essential to implement this if I'm implementing all the other parts of app indexing?

Okay, so it seems I'm confusing App Indexing and App Links. I'm sure I'm not alone in this, since even Google seem to use the terms interchangeably and non-strictly - for example if you choose Tools -> Firebase App Indexing Test and the test fails, when you click on Learn more you are taken to a page that is 90% about App Links, and down at the bottom is one small paragraph about App Indexing.

Here's what that paragraph says:

Add Firebase App Indexing

After adding Android App Links to your app, you can add Firebase App Indexing code to an activity to get re-engagement to your app from additional Google Search features, including autocomplete suggestions and In Apps search. Learn more about Firebase App Indexing in the Firebase App Indexing documentation.

So it seems that App Indexing is not directly connected to App Links, and is in a sense a totally different feature.

Furthermore, looking at the Firebase documentation , here is finally some real information about the purpose of the indexing code:

Log User Actions

Google Search takes into account the actions users take on public and personal app content and uses that to provide improved ranking for Search results and suggestions. Log user actions in your app to improve your users' experience when they search for content in your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM