Search code examples
androidandroid-activityintentfilter

How to make launch of application


I am working on one application,What i am trying to do is first user will register from my app,after successful registration,one confirmation link will get in gmail,now from that mail if user will click on confirmation link,my app should open,Is it possible? can any one help me with that?


Solution

  • you must do some changes your manifest. Do changes in launcher or default activity like below:

     <activity
            android:name=".MainActivity"
            android:configChanges="keyboardHidden|orientation|keyboard|screenSize"
            android:windowSoftInputMode="stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
    
                <data
                    android:host="yoursitedomain.com"
                    android:scheme="http" />
                <data
                    android:host="www.yoursitedomain.com"
                    android:scheme="http" />
            </intent-filter>
        </activity>
    

    BROWSABLE and data tags help you.