【问题标题】:How to launch the app from SMS content (link)如何从 SMS 内容启动应用程序(链接)
【发布时间】:2017-01-24 05:45:29
【问题描述】:

当点击通过短信或电子邮件收到的链接时,我需要启动我的应用程序。我的意思是,接收短信的人只需点击提供的链接,即可启动应用程序。

【问题讨论】:

标签: android android-manifest launch


【解决方案1】:

点击链接时,您想打开哪个活动 需要像这样在 Menifest 中使用 IntentFilter

<activity
            android:name=".interacting.InteractWithApps"
            android:parentActivityName=".index.IndexActivity">
            <intent-filter>
                <data
                    android:host="www.domain.com"
                    android:scheme="http" />

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

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

您还需要定义链接架构和主机

你应该按照this link关注

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-12
    • 1970-01-01
    • 2011-02-08
    • 2023-03-04
    • 1970-01-01
    • 2021-10-30
    • 2012-03-06
    相关资源
    最近更新 更多