问题
Guys, I need to implement Applink (Universal Link) step by step both android and iOS, please any to help achieve this. I tried the following code in my android project
I followed this URL to write this https://devblogs.microsoft.com/xamarin/connect-with-your-users-with-google-search-and-app-indexing/
Note I no need to indexing concept just want to open the app from Clicking of any URL
First I Installed Xamarin.Forms.AppLinks NuGet
Below code MainActivity
[IntentFilter(new[] { Android.Content.Intent.ActionView },
Categories = new[]
{
Android.Content.Intent.CategoryDefault,
Android.Content.Intent.CategoryBrowsable
},
DataScheme = "http",
DataPathPrefix = "/",
DataHost = "test.com")]
- Then write bellow code in OnCreate Method
AndroidAppLinks.Init(this);
- Then I try to call deeplink URL "test://DeeplinkingSample" from Deep Link Tester
Its saying No Activity found to handle the intent
回答1:
4.Then I try to call deeplink url "test://DeeplinkingSample" from Deep Link Tester
Its saying No Activity found to handle intent
You are trying to call the URL test://DeeplinkSample
, which has the following parts
- Scheme is
test
- Host is
DeeplinkSample
- No data path
However, you did not register your activity for that URL, but for the scheme http
, with the host test.com
and the data path prefix /
(i.e. presumably all data paths that start with /
). Hence the app should open when you are trying to open
http://test.com/...
来源:https://stackoverflow.com/questions/59926139/how-to-implement-deeplinkuniversal-linking-in-xamarin-forms-both-android-and-i