【问题标题】:Xamarin Android complete action withXamarin Android 完成动作
【发布时间】:2018-10-01 10:12:05
【问题描述】:

我创建了一个几乎完成的应用程序。 使用 Samsung MyFiles 应用程序或其他方式浏览文件时,您必须能够单击文件并在可用应用程序列表中打开我的应用程序的“使用/打开方式完成操作”对话框。如何让我的应用出现在该列表中?

至少有人可以帮我指出正确的方向吗?

谢谢!

凯文

【问题讨论】:

    标签: android xamarin android-intent intentfilter


    【解决方案1】:

    试试这个:

    [Activity (Label = "MyApp", MainLauncher = true, Icon = "@drawable/icon")]
    [IntentFilter (new string[] {Intent.ActionView}, 
                  Categories=new string[] { Intent.CategoryDefault, Intent.CategoryBrowsable },  
                  DataScheme="file", 
                  DataHost="*", 
                  DataMimeType="*/*", 
                  DataPathPattern=".*\\\\.abc")]  
    
    public class MainActivity : Activity 
    {
      your activity's code here...
    }
    

    .abc 是您要使用您的应用打开的文件扩展名。

    【讨论】:

      猜你喜欢
      • 2018-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-26
      • 2013-03-26
      • 1970-01-01
      相关资源
      最近更新 更多