
Let’s see what a typical setup for this scenario might look like. Http(s)://(Activity B: example-scheme://activityb?query=Īctivity C: example-scheme://activityc?query=&choice= The deep links will contain the same arguments in a bespoke format.ĭeep links that need to be supported include:

When switching between the activities, arguments are passed between them using the standard Intent Mechanism. We need to support deep links to each of these activities – both custom schema URIs and web URIs.Īctivity B needs one argument to work properly, whereas activity C needs two. Let’s say we have three activities, A, B and C. Here we present a simple way to structure your code so that it’s headache free and, more importantly, unit-testable.

It’s easy to implement, but it’s also easy to go overboard and make a mess of your, otherwise pretty, code. App Indexing allows Google searches to deep link straight into the app activities that you expose. It’s particularly useful if, like JUST EAT, you have a website that hands off content to the app, or for Google App Indexing. Deep linking in Android serves as a useful way for other apps, services or web pages to open relevant content within your app.
