My xamarin.forms app works with sqlite3 files which have the extension .rde
, and I want people to be able to open .rde
files from the files app, downloaded from the browser etc., with an implicit intent.
I've followed this tutorial and modified the intent to match my extension:
namespace myapp.Droid
{
[Activity(Label = "myapp", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
[IntentFilter(new[] { Intent.ActionEdit }, Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataPathPattern = ".*\\.rde", DataSchemes = new[] { "file", "content" }, DataHost = "*", DataMimeType = "*/*")]
//...
}
This doesn't appear to be sufficient. When I install this app on my device and try to open a downloaded .rde file, the files app shows an alert "Search the Play Store? You don't have any apps that can open this type of file." What do I need to change to register this intent with the .rde
file type, or how can I diagnose why Android doesn't match my intent in this case?