--> How To Add Deep Linking Support To Your Android App? | Experience Lab - Online business creation and development guide for bloggers and startups

How To Add Deep Linking Support To Your Android App?

App deep links helps users access content inside your app while browsing the web on their smartphone. They are like hyperlinks, but inst...




Add deep linking support to your app

App deep links helps users access content inside your app while browsing the web on their smartphone. They are like hyperlinks, but instead of a webpage, they open an app page with the content that the user is looking for. Google has incorporated the app indexing feature into its search results, which makes it possible for app developers to make their app's content available to the search engine. However, for app indexing to work properly, the first step is to enable support for deep links inside your Android apps.


Adding Deep Link support to Android apps



In order for Google to be able to index your Android app and make it contents available in search results, you have to primarily define an intent filter inside your app manifest file. Every app has a manifest file which defines all the activities and processed of an app, and how objects communicate.




An Intent is a messaging object you can use to request an action from another app component. Intents primarily facilitate communication between components. In this post, I'll show you how to create an intent to enable deep linking inside your app.




If you're new to Android apps, or want to get started: How To Create Your First "Hello World" Android App?


Defining an intent filter



Intent filters are added inside your app manifest file. To define an intent filter;




Step 1: Intent filter element - Add an <intent-filter> element for each activity that should be launchable from Google Search results.




Step 2: Action tag - Add an <action> tag that specifies the ACTION_VIEW intent action inside the intent filter to .




Step 3: Data tag - Add a <data> tag for each data URI format the activity accepts. This is the primary mechanism to declare the format for your deep links.




Step 4: Category - Add a <category> for both BROWSABLE and DEFAULT intent categories.




Note: BROWSABLE is required in order for the intent to be executable from a web browser. Without it, deep linking won't work. DEFAULT is not required if your only interest is providing deep links to your app from Google Search results. However, it is if you want your Android app to respond when users click links from any other webpage that points to your website.


Putting it together



The following example shows an activity that allows users to enter the app using an intent to view information about recipes. The intent filter declares that the activity responds to VIEW action intents containing URIs that begin with http://somecookbook.com/recipe:


<activity android:name="com.somecookbook.android.RecipesActivity"

   android:label="@string/title_recipes" >

   <intent-filter android:label="@string/filter_title_viewrecipes">

      <action android:name="android.intent.action.VIEW" />

      <data android:scheme="http"

     android:host="somecookbook.com"

 android:pathPrefix="/recipes" />

      <category android:name="android.intent.category.DEFAULT" />

      <category android:name="android.intent.category.BROWSABLE" />

   </intent-filter>

</activity>


In this example, your app would respond to deep links such as http://somecookbook.com/recipe?123 or http://somecookbook.com/recipe/123 etc.




These were the basics of enabling deep link support for your app. We'll dig deeper in future posts, discussing how to restrict access to your app's content, and much more! In the meantime, if you have any questions, please feel free to ask in the comments section below! Stay tuned ;)


COMMENTS

Name

Affiliate Marketing,12,Announcement,34,Bing,9,Bitcoin,38,blog,7,Blogger Resources,42,Blogger Templates,4,blogger tricks,156,Blogging ethics,70,Blogging tips,198,Bugs and Errors,34,Business,4,Copyright Violation,9,CSS and HTMLTricks,95,Designs,8,drop down menu,7,eBook,12,Email Marketing,7,Events,30,Facebook,30,Facebook tricks,49,Google,157,Google AdSense,42,Google Analytics,7,Google Plus,51,Google Plus Tricks,38,Guest Posts,112,home,2,How To,77,Internet,1,JSON Feeds,25,Kitchen Recipes,2,Label Based Sitemap Themes,1,Make Money Online,108,Marketing,16,MBT Blogger Templates,7,Menus,1,News,146,Pages,1,Posts,10,presentations,15,Responsive,10,Reviews,7,SEO,307,Settings,6,Shortcode,15,Sitemap Themes,1,Social Media,155,Technology,3,Templates,1,Tips,2,Tools,1,Traffic Tips,80,Video,19,Web Designing,62,web hosting,18,Webmaster Tools,97,Widgets,199,wordpress,26,
ltr
item
Experience Lab - Online business creation and development guide for bloggers and startups: How To Add Deep Linking Support To Your Android App?
How To Add Deep Linking Support To Your Android App?
http://1.bp.blogspot.com/-E6tQMekbp_M/U7gd8Cq5hgI/AAAAAAAAF8k/llRAtS_IB9M/s1600/deep-linking.jpg
http://1.bp.blogspot.com/-E6tQMekbp_M/U7gd8Cq5hgI/AAAAAAAAF8k/llRAtS_IB9M/s72-c/deep-linking.jpg
Experience Lab - Online business creation and development guide for bloggers and startups
https://www.experiencelab.info/2014/07/how-to-add-deep-linking-support-to-your.html
https://www.experiencelab.info/
https://www.experiencelab.info/
https://www.experiencelab.info/2014/07/how-to-add-deep-linking-support-to-your.html
true
2959477579779989044
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy