My app generates .smbf files and I want to make an option to open these files in my app when user want to open them using file manager apps. After searching I found a way using intent filter and this is my code:
[Android.App.Activity(Label = "Setting", Theme = "@style/MyTheme", WindowSoftInputMode = SoftInput.StateHidden, Icon = "@drawable/Icon")]
[Android.App.IntentFilter(actions: new string[] { Intent.ActionView, Intent.ActionEdit }, Categories = new string[] { Intent.CategoryDefault }, DataPathPattern = @".*\\.smbf", DataHost = "*", DataScheme = "file")]
public class Setting : MyActivity
{..}
And the generated manifest:
<activity android:icon="@drawable/icon" android:label="Setting" android:theme="@style/MyTheme" android:windowSoftInputMode="stateHidden|adjustUnspecified" android:name="md5307edafcc42f816474105a485627044f.Setting">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:host="*" android:pathPattern=".*\\.smbf" android:scheme="file" />
</intent-filter>
</activity>
But my app isn't shown in the list of apps that can open *.smbf file. (tested with solid and es file explorers) Is there anything more that I should do?