App Indexing is a really cool system that takes an account of actions to your application, which would enable query autocompletions for app users (both Android and iOs), as well as richer search results.
I am a hardcore football fan and i follow Manchester United football club religiously.
I have installed all cool apps related to football and Man Utd.
You might be thinking what this has to do with App Indexing. I will explain.
After a while i stopped using several apps i downloaded. It’s not that those apps were bad, but I just forgot about them.
So when i wanted to know about the next Man Utd fixture instead of performing steps, like Open app -> Select Man Utd -> Choose fixtures -> Select timing and venue details,
I just google it. And i am happy with the results, most of the time .
So an easy google search essentially replaced your app. Simply because the user forgot about your app. This is where App Indexing comes in. If your app has App Indexing implemented there will be a slight change in the scenario i mentioned.
When i google Man Utd fixtures, the autocompletion finish the query sentences and brings up your app among the query results. And the user gets to see the relevant content.
![1 1](https://agileblaze.com/wp-content/uploads/2016/01/1-600x352.jpg)
To implement App Indexing there are few things you need to take care of. In order to get your app to come up in the search results you need to enable App Deep Link.
![4 4](https://agileblaze.com/wp-content/uploads/2016/01/4-600x352.jpg)
ACTION VIEW
intent is used to help Google Search reach the intent-filter.
BROWSABLE
category is required in order for the intent filter to be accessible from a web browser.
DEFAULT
category is recommended. Without it the can only be started started with explicit intent, using your app component name.
If you have other intent-filters you might want to give that in a separate intent-filter.
To implement App Indexing:
After enabling App Deep Linking we have to implement App Indexing. Add this code in your manifest file
![5 5](https://agileblaze.com/wp-content/uploads/2016/01/5-600x153.jpg)
In your build.gradle add this code
compile 'com.google.android.gms:play-services-appindexing:7.0.0'
![2 2](https://agileblaze.com/wp-content/uploads/2016/01/2-600x352.jpg)
Then in onCreate of that activity use this code:
Create a GoogleApiClient.
private GoogleApiClient mClient;
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_recipe);
mClient = new GoogleApiClient.Builder(this).addApi(AppIndex.APP_INDEX_API).build();
onNewIntent(getIntent());
}
And in onStart() connect the GoogleApiClient.
{...
super.onStart();
mClient.connect();
AppIndex.AppIndexApi.start(mClient, getAction());
Action viewAction = Action.newAction(Action.TYPE_VIEW, mTitle, BASE_APP_URI);
...}
And in onStop() connect the GoogleApiClient.
{...
AppIndex.AppIndexApi.end(mClient, getAction());
Action viewAction = Action.newAction(Action.TYPE_VIEW, mTitle, BASE_APP_URI);
...
mClient.disconnect();
super.onStop();
...}
![6 6](https://agileblaze.com/wp-content/uploads/2016/01/6-600x86.jpg)
![3 3](https://agileblaze.com/wp-content/uploads/2016/01/3-600x352.jpg)
Next is to associate a website
You can make the association between your app and your site from either the Search Console or Google Play. In either case, you must be a verified owner of the app in Google Play and use the same Google account when managing the app in Search Console.
From Search Console: Add and verify your app to Search Console (see Search Console for Apps for instructions). Go to Associate a Website, choose your verified app from the list, and enter the URL of the site or sites you want to associate with the app.
From the Developer Console: Request to verify your website. This sends a message to your webmaster to associate your app to your site.
Add Deep Links in Your Web Pages
Instead of specifying the deep links for Google Search app indexing in your Sitemap file, you can annotate the deep links in the HTML markup of your web pages. You can do this in thesection for each web page by adding a tag and specifying the deep link as an alternate URI. For example, the following HTML snippet shows how you might specify the corresponding deep link in a web page that has the URL example://hello.
![7 7](https://agileblaze.com/wp-content/uploads/2016/01/7-600x169.jpg)
App Indexing for iOS apps:
App Indexing for iOS 9 uses HTTP URLs to direct users to content in your app. The main steps are the following:
- Add handling for universal links to your app.
- Adopt the
UIApplicationDelegate
methods so that your app opens the appropriate app content in response to the user’s click from search results. - Create the app-to-site association. This involves two things:
- Add a
com.apple.developer.associated-domains
entitlement in XCode that lists each domain associated with your app. - Create an
apple-app-site-association
file for each associated domain with the content your app supports and host it at the root level.
- Add a
Note: The association file must be hosted on a domain that supports HTTPS/TLS, even if the HTTP deep links are not themselves served via HTTPS.
Next is to add the App Indexing SDK
Use CocoaPods
App Indexing uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your app, type in:
pod init
If you already use CocoaPods, make sure it’s up to date and type in terminal:
sudo gem update cocoapods
Add App Indexing
Add the following to your Podfile:
pod 'GoogleAppIndexing'
This statement pulls the App Indexing dependencies from the CocoaPods repository.
Save and install
pod install
Initially, this command creates an .xcworkspace
file for your application configured for App Indexing. Use this file for all future development in your project and repeat this command to update your workspace.
Import GoogleAppIndexing
From the new workspace, add the GoogleAppIndexing
header at the top of your AppDelegate
class.
![inicinate inicinate](https://agileblaze.com/wp-content/uploads/2016/01/inicinate.png)
Register your app to our system
Call the registerApp:
method in your application:didFinishLaunchingWithOptions
: method.
[[GSDAppIndexing sharedInstance] registerApp:your iTunes ID];
That should do it ! Once the crawlers discover the the URLs in your association file, Google will automatically start indexing any existing or new HTTP deep links to your app.
![OpenTable-Side-by-side1 OpenTable-Side-by-side1](https://agileblaze.com/wp-content/uploads/2016/01/OpenTable-Side-by-side1.jpg)
![Screen-Shot-2015-12-15-at-8.14.33-AM (1) Screen-Shot-2015-12-15-at-8.14.33-AM (1)](https://agileblaze.com/wp-content/uploads/2016/01/Screen-Shot-2015-12-15-at-8.14.33-AM-1.png)
To conclude App indexing is changing the landscape of digital marketing and the way mobile search results were. This is an important tool to get significant amount of data that was going undiscovered. App Indexing your Mobile apps (Android and iOS) could help build better, more relevant customer experiences in the future. With this ability your app will get more relevance and visibility. How cool is that. It’s a win win. User gets the results and your app gets used again. Its subtle advertisement.
The Google In app search is the outcome of Google App indexing . More here: http://www.theverge.com/2016/8/31/12724058/google-android-in-apps-search