问题
Recent Android Dev Summit said that deep links are introduced in Android. What does it mean?
I researched the internet and found deep linking in Web, but how does it pertain to Mobile or Android in specific?
回答1:
Deep Linking is methodology for opening an android app from a link, and you can also send data into app using link. If the app is not available then they redirect on play store and display your app.
For example if you have made one app for shopping you want to share special offer on any network or social media, throw URL and when any buddy click on URL an open your app and display offer.
You need to add the following code in a Androidmainfest.xml
file
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/FolderName" />
<!-- note that the leading "/" is required for pathPrefix-->
<!-- Accepts URIs that begin with "example://gizmos”
<data android:scheme="example"
android:host="gizmos" />
-->
</intent-filter>
</activity>
来源:https://stackoverflow.com/questions/33979849/what-is-a-deep-link-in-android