I am working on a Xamarin.Android application.
I've defined a "Deep Linking", like :".example.com". Everything works fine, but I need a blacklist on a specific folder like ".example.com/media/*" (because in this folder I have only the files/attachments).
<!-- Activities -->
<activity android:name="ApplicationLaunchActivity">
<intent-filter android:autoVerify="true">
<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" android:host="*.example.com" />
</intent-filter>
</activity>
And in LaunchActivity I have
[IntentFilter(new[] { Android.Content.Intent.ActionView },
AutoVerify = true,
Categories = new[]
{
Android.Content.Intent.CategoryDefault,
Android.Content.Intent.CategoryBrowsable
},
DataScheme = "https",
DataPathPrefix = "",
DataHost = "*.example.com"
)]
So, as I've read in this post , there is no blacklisting in Deep Linking in IntentFilter. So what I can to do is loading files in a WebView. For image files, I've no problem but for files with pptx or pdf, there is shows nothing in WebView.
WebView postAttachmentsWebView = FindViewById<WebView>(Resource.Id.PostAttachmentsWebView);
postAttachmentsWebView.LoadUrl(url);
Do you have any idea for me? Is there any solution for forcing Android to open this specific URL with WebBrowser on not using DeepLinking? Or other solution? Any suggestions?