My app is working fine but whenever i add deep link code in my manifest my app lunching icon disappears this is my manifest file
You must use multiple intent-filter tags:
<activity
android:name=".login.LoginActivity"
android:screenOrientation="portrait">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<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="https" />
<data android:host="gizbo.ae" />
</intent-filter>
</activity>
You have to add another activity to use deep linking and then start your login activity and pass your data to that.
So declare the activity as below:
<activity
android:name=".DeelinkActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden">
<!-- URL scheme -->
<intent-filter>
<data android:host="gizbo.ae"
android:scheme="https" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- End URL scheme -->
</activity>
and then in onCreate in that activity you can call the login activity also from there you can pass your data to that activity.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Intent intent = getIntent();
String action = intent.getAction();
Uri data = intent.getData();
//put code to pass data as extras and Start your login activity here
}
Good luck.