深层链接不在发布者应用中

发布于 2025-02-13 22:33:59 字数 2414 浏览 0 评论 0原文

我创建了一个发布者应用程序,在其中呈现与广告相关的标签。我呈现的广告通常具有点击率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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文