我的應用未通過認證,原因是:「4.1.1如果您的應用具有網絡功能,您必須擁有隱私聲明 ...... 您必須在應用的說明頁面中提供對隱私政策的訪問權限就像在Windows設置中顯示的應用程序設置一樣。「在Windows 8應用程序中你應該編寫'隱私策略'?
他們在說什麼?什麼說明?我如何設置窗口設置中顯示的信息?
的應用程序是C#
我的應用未通過認證,原因是:「4.1.1如果您的應用具有網絡功能,您必須擁有隱私聲明 ...... 您必須在應用的說明頁面中提供對隱私政策的訪問權限就像在Windows設置中顯示的應用程序設置一樣。「在Windows 8應用程序中你應該編寫'隱私策略'?
他們在說什麼?什麼說明?我如何設置窗口設置中顯示的信息?
的應用程序是C#
在最近的MS win8 devcamp中,我們被告知最簡單的選擇是在您的應用程序的設置配置文件中爲您的在線隱私策略鏈接一個鏈接。
你可以找到一些手在C#這裏的實驗室:
http://msdn.microsoft.com/en-us/windows/apps/jj674832
其中包含了題爲「Lab_Settings_CS」您可以複製並粘貼更改「關於」頁面,你的「隱私政策」演示頁面 - 這只是一個新的用戶控制。
的鏈接添加到您的隱私政策:
//using Windows.UI.ApplicationSettings;
//using System;
// You can put this event handler somewhere in a main class that runs your app.
// I put it in may main view model.
SettingsPane.GetForCurrentView().CommandsRequested += ShowPrivacyPolicy;
// Method to add the privacy policy to the settings charm
private void ShowPrivacyPolicy(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
SettingsCommand privacyPolicyCommand = new SettingsCommand("privacyPolicy","Privacy Policy", (uiCommand) => { LaunchPrivacyPolicyUrl(); });
args.Request.ApplicationCommands.Add(privacyPolicyCommand);
}
// Method to launch the url of the privacy policy
async void LaunchPrivacyPolicyUrl()
{
Uri privacyPolicyUrl = new Uri("http://www.yoursite.com/privacypolicy");
var result = await Windows.System.Launcher.LaunchUriAsync(privacyPolicyUrl);
}
不是打開一個網頁鏈接,就可以直接在代碼的代碼本身的隱私政策。在App.xaml中。CS,下面的代碼粘貼
private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)
{
var privacy = new SettingsCommand("PrivacyPolicy", "PrivacyPolicy", (handler) =>
{
var settings = new SettingsFlyout();
settings.Content = new PrivacyUserControl();
//settings.HeaderBrush = new SolidColorBrush(_background);
//settings.Background = new SolidColorBrush(_background);
settings.HeaderBrush = _Hbackground;
settings.Background = _background;
settings.HeaderText = "Privacy Policy";
settings.IsOpen = true;
});
args.Request.ApplicationCommands.Add(privacy);
UICommandInvokedHandler handler1 = new UICommandInvokedHandler(onSettingsCommand);
// throw new NotImplementedException();
}
void onSettingsCommand(IUICommand command)
{
SettingsCommand settingsCommand = (SettingsCommand)command;
((Frame)Window.Current.Content).Navigate(typeof(HelpPage), "");
}
創建一個新的用戶控件
<UserControl
xmlns:common="using:App.Common"
x:Class="App.UserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<StackPanel >
<TextBlock Foreground="White" Text="Privacy Policy" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="26.667" />
<TextBlock Margin="0,50,0,0" Foreground="White" Text="put your notes here" FontFamily="Segoe UI" FontWeight="SemiLight" FontSize="18" TextWrapping="Wrap" />
</StackPanel>
</Grid>
我像這個解決方案。唯一的問題是,根據Windows指南,您還必須在應用程序的「說明」頁面上擁有隱私政策。所以你必須在兩個地方都保持它,除非在用戶控制中你仍然從網上抓取它。 – BryanJ
如果您的應用程序不包含任何隱私政策,並在認證你得到同樣的錯誤4.1則有是你必須遵循的非常簡單的步驟:
就這樣! :)
在最近的MS win8 devcamp中,我們被告知最簡單的選擇是在您的應用的設置配置文件中爲您的在線隱私策略鏈接一個鏈接。 – peacemaker
謝謝..我會很感激,如果你可以給一個鏈接 - 你怎麼編碼的設置魅力在C#中?這將是我的問題的答案... –
去這裏:http://msdn.microsoft.com/en-us/windows/apps/jj674832下載實驗室的C#和檢查出設置演示 – peacemaker