点击验证链接后,如何将邮件重定向到Android App

时间:2015-10-09 10:06:08

标签: android url

点击邮件上的验证链接后,如何直接重定向到Android应用程序请解释。

示例:

enter image description here

2 个答案:

答案 0 :(得分:1)

您需要在要点击URL的活动中使用意图过滤器,如下所示:

     <activity
           .
           .
           .

            android:windowSoftInputMode="stateVisible|adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data
                    android:scheme="http"
                    android:host="www.yourdomain.com"
                    android:pathPrefix="/path/to/resource" />
            </intent-filter>
     </activity>

在你的情况下

  1. scheme将为https
  2. host将为www.quora.com
  3. pathPrefix将为/signup/confirm_email

答案 1 :(得分:0)

@RAHUL TIWARI

这是Register_PAGE我写了你的代码...... 在点击提交按钮后的活动中,将向电子邮件地址发送一个验证链接。 (被困在)更加坚固的验证链接它必须回到myApp ..

的Manifest.xml  

    <activity android:name=".Register_User">
        android:windowSoftInputMode="stateVisible|adjustResize" >
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

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

            <data
                android:scheme="http"
                android:host="scaano.com"
                android:pathPrefix="/Welcome/userprofile" />
        </intent-filter>

    </activity>

这是我收到邮件的电子邮件:

[0 enter image description here