How to create a deep link in app?

烈酒焚心 提交于 2019-12-24 00:34:41

问题


I am working in app. There need to create a deep link. User can able to share particular item and user can open direct page from click link. I follow enter link description here

 <intent-filter >
          <!--  android:autoVerify="true"-->

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

            <data android:scheme="https"
                android:host="www.jobzminer.com"
                android:pathPrefix="/appplay" />

            <data android:scheme="jobzminer"
                android:host="appplay" />
   </intent-filter>

but when i put link into browser then its not working.


回答1:


As mentioned in the comments, to update your url to: https://www.jobzminer.com/appplay. Also clear your browser as a default app.

To pass parameters, you could use query parameters. Change your url like this: https://www.jobzminer.com/appplay?param1=hello&param2=world

Then in your activity. Do this:

Intent intent = getIntent();
Uri data = intent.getData();
String param1 = data.getQueryParameter("param1");
String param2 = data.getQueryParameter("param2");

You can also see my answer here.




回答2:


Deeplinking can be well achieved by Branch SDK. They have amazing docs to integrate branch sdk and get going. Refer this link https://dev.branch.io/getting-started/sdk-integration-guide/guide/android/



来源:https://stackoverflow.com/questions/36280007/how-to-create-a-deep-link-in-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!