I need to enable my app to extract the zip file and I want to open my app when a zip file is clicked (selected) from the device. I have Created and IntentFilter after reviewing some posts like this and this
[Activity(Label ="Zip")]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryDefault },
DataScheme ="file",
DataHost ="*",
DataPathPattern = "*\\.zip",
DataMimeType = "application/zip"
DataPathPattern = "*\\.zip",
DataMimeType = "application/zip"
)]
And the code for activity goes here :
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var uri = Intent.Data.Path;
Toast.MakeText(this, uri, ToastLength.Long);
}
Problem: when I select the zip file my app is not getting launched. Reference Documentation : https://developer.android.com/guide/topics/manifest/data-element.html