【问题标题】:Uri for accesing to a specific document in OneDrive用于访问 OneDrive 中特定文档的 URL
【发布时间】:2016-09-23 04:28:16
【问题描述】:

在通用应用程序(windows 10)的以下代码中,可以打开 Skype 并调用 usertocall。 如果此 uri 更改为 new Uri(@"ms-Onedrive:"); OneDrive 应用程序将被打开。 哪个是访问存储在 Onedrive 中的特定文档的正确 Uri?

 private async void button_Click(object sender, RoutedEventArgs e)
    {
        var uriSkype = new Uri(@"skype:(usertocall)?call");

        // Set the option to show a warning
        var promptOptions = new Windows.System.LauncherOptions();
     //   promptOptions.TreatAsUntrusted = true;

        // Launch the URI
        var success = await Windows.System.Launcher.LaunchUriAsync(uriSkype);

        if (success)
        {
            // URI launched
        }
        else
        {
            // URI launch failed
        }
    }

【问题讨论】:

    标签: c# onedrive universal


    【解决方案1】:

    您不能使用本地协议处理程序来访问文件。它用于应用之间的通信,并要求 OneDrive 应用显示各种 UI,但不会让您访问文件。

    您需要使用 OneDrive API (https://dev.onedrive.com) 才能访问用户的 OneDrive 内容。

    【讨论】:

    • 实际上我是从在同一设备上运行的其他 UniversalApp (Hololens) 调用 OneDrive 应用程序
    猜你喜欢
    • 2021-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-13
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    相关资源
    最近更新 更多