深层链接不在发布者应用中
我创建了一个发布者应用程序,在其中呈现与广告相关的标签。我呈现的广告通常具有点击率URL,例如 https://youtube.com 或 https://facebook.com 。
当我单击广告时,我希望这些链接可以打开内应用程序而不是浏览器(直接单击这些链接作为文本,它是在应用程序内打开的) 我是否需要添加任何类型的代码来实现此目标,因为我想到它应该自动发生?
我是Android的新手,所以请让我知道您是否需要更多细节,以便在评论中更好地理解。
编辑 - 添加 androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.iab.omid.sampleapp">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:networkSecurityConfig="@xml/network_security_config"
android:name=".AdApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".AdListActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".AdDetailActivity"
android:label="@string/title_ad_detail"
android:parentActivityName=".AdListActivity"
android:theme="@style/AppTheme.NoActionBar"
android:exported="false">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.iab.omid.sampleapp.AdListActivity"/>
</activity>
<activity android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"
android:exported="true"/>
</application>
</manifest>
I have created a publisher app where I render ad-related tags. The ad that I render generally has clickThrough URLs like https://youtube.com or https://facebook.com.
When I click on my ad I want these links to open in-app instead of the browser.(On directly clicking these links as text, it is opening in-app)
Do I need to add any type of code for making this happen because I am in the idea that it should happen automatically?
I am new to android, so please let me know if you need any more details for better understanding in the comments.
Edit - Adding AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.iab.omid.sampleapp">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:networkSecurityConfig="@xml/network_security_config"
android:name=".AdApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".AdListActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".AdDetailActivity"
android:label="@string/title_ad_detail"
android:parentActivityName=".AdListActivity"
android:theme="@style/AppTheme.NoActionBar"
android:exported="false">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.iab.omid.sampleapp.AdListActivity"/>
</activity>
<activity android:name="com.squareup.leakcanary.internal.DisplayLeakActivity"
android:exported="true"/>
</application>
</manifest>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论