相关疑难解决方法(0)

在Xamarin Forms中开始Android活动?

我正在尝试使用以下代码在我的应用程序中使用默认的Android pdf查看器查看托管的PDF文件

            var intent = new Intent(Intent.ActionView);

            intent.SetDataAndType(Uri.Parse("http://sample/url.pdf"), "application/pdf");
            intent.SetFlags(ActivityFlags.ClearTop);
            Android.Content.Context.StartActivity(intent);
Run Code Online (Sandbox Code Playgroud)

我在Native项目中使用过这段代码,所以我知道它在Android活动中有效.对于Xamarin Forms,我是否有办法从内容页面启动Android活动,反之亦然?

xamarin.android xamarin.forms

4
推荐指数
1
解决办法
6218
查看次数

标签 统计

xamarin.android ×1

xamarin.forms ×1