I want to register a custom file association and process the file. To process the file I need the bytes array behind the file.
I successfully registered myself for a custom .xmoo extension via:
[IntentFilter(new[] { Intent.ActionView }, Categories = new[] { Intent.CategoryDefault }, DataMimeType = "application/*", DataPathPattern = "*.xmoo")]
public class SplashActivity : AppCompatActivity
{
public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
{
base.OnCreate(savedInstanceState, persistentState);
Android.Net.Uri fileUri = Intent.Data;
Now, I'm however at a loss of how I get the bytes array from the Uri. What's the canonical way to read the bytes?