diff --git a/CompassVO/AboutPage.xaml b/CompassVO/AboutPage.xaml index 0d7308b..e032447 100644 --- a/CompassVO/AboutPage.xaml +++ b/CompassVO/AboutPage.xaml @@ -48,13 +48,13 @@ Version: 1.2.0.0 - + Carefully designed by @@ -111,6 +111,17 @@ Thank you for your feedback and ideas! + diff --git a/CompassVO/Assets/Docs/privacy_policy.html b/CompassVO/Assets/Docs/privacy_policy.html new file mode 100644 index 0000000..47752d7 --- /dev/null +++ b/CompassVO/Assets/Docs/privacy_policy.html @@ -0,0 +1,16 @@ + + + Compass VO - privacy policy + + +

Compass VO - privacy policy

+
+ Compass VO does NOT colect and doe NOT transmit user personal data anywhere, NO user info and NO personal data is disclosed with JWP or any other third parties.
+ - Application needs access to device camera so the user can take a photo of a map or anybackground image he wants to use as navigation helper.
+ The captured image is stored in application dedicated private space inside device and is deleted if the user selects the delete command button from the interface or when the application is uninstalled.
+ This file is NOT sent over the wire at all times and it stays on the device only in the personal space of the user and this application, as defined by Microsoft Windows and Windows Phone Store Policies.
+ - Application needs access to media folder so the user can pick a topo map picture or any picture to stand in the background as helper support for navigation.
+ - The selected picture from media folder in NOT sent over the wire at all times and it stays on the device only in the personal space of the user and this application, as defined by Microsoft Windows and Windows Phone Store Policies.
+
+ + \ No newline at end of file diff --git a/CompassVO/CompassVO.csproj b/CompassVO/CompassVO.csproj index f412b6c..59acfd5 100644 --- a/CompassVO/CompassVO.csproj +++ b/CompassVO/CompassVO.csproj @@ -151,6 +151,9 @@ + + PrivacyPolicy.xaml + @@ -207,6 +210,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -249,6 +256,7 @@ Designer + PreserveNewest diff --git a/CompassVO/PrivacyPolicy.xaml b/CompassVO/PrivacyPolicy.xaml new file mode 100644 index 0000000..7cff9ff --- /dev/null +++ b/CompassVO/PrivacyPolicy.xaml @@ -0,0 +1,26 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/CompassVO/PrivacyPolicy.xaml.cs b/CompassVO/PrivacyPolicy.xaml.cs new file mode 100644 index 0000000..fcf186f --- /dev/null +++ b/CompassVO/PrivacyPolicy.xaml.cs @@ -0,0 +1,85 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Navigation; +using Microsoft.Phone.Controls; +using Microsoft.Phone.Shell; +using System.Windows.Resources; +using System.IO.IsolatedStorage; +using System.IO; + +namespace CompassVO +{ + public partial class PrivacyPolicy : PhoneApplicationPage + { + public PrivacyPolicy() + { + InitializeComponent(); + } + + private void webPolicy_Loaded(object sender, RoutedEventArgs e) + { + SaveFilesToIsoStore(); + webPolicy.Navigate(new Uri("/Assets/Docs/privacy_policy.html", UriKind.Relative)); + } + + + private void SaveFilesToIsoStore() + { + //These files must match what is included in the application package, + //or BinaryStream.Dispose below will throw an exception. + string[] files = { + "Assets/Docs/privacy_policy.html" + }; + + IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication(); + + if (false == isoStore.FileExists(files[0])) + { + foreach (string f in files) + { + StreamResourceInfo sr = Application.GetResourceStream(new Uri(f, UriKind.Relative)); + using (BinaryReader br = new BinaryReader(sr.Stream)) + { + byte[] data = br.ReadBytes((int)sr.Stream.Length); + SaveToIsoStore(f, data); + } + } + } + } + + private void SaveToIsoStore(string fileName, byte[] data) + { + string strBaseDir = string.Empty; + string delimStr = "/"; + char[] delimiter = delimStr.ToCharArray(); + string[] dirsPath = fileName.Split(delimiter); + + //Get the IsoStore. + IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication(); + + //Re-create the directory structure. + for (int i = 0; i < dirsPath.Length - 1; i++) + { + strBaseDir = System.IO.Path.Combine(strBaseDir, dirsPath[i]); + isoStore.CreateDirectory(strBaseDir); + } + + //Remove the existing file. + if (isoStore.FileExists(fileName)) + { + isoStore.DeleteFile(fileName); + } + + //Write the file. + using (BinaryWriter bw = new BinaryWriter(isoStore.CreateFile(fileName))) + { + bw.Write(data); + bw.Close(); + } + } + } +} \ No newline at end of file diff --git a/CompassVO/ViewModel/MainViewModel.cs b/CompassVO/ViewModel/MainViewModel.cs index 481bd56..6817406 100644 --- a/CompassVO/ViewModel/MainViewModel.cs +++ b/CompassVO/ViewModel/MainViewModel.cs @@ -630,6 +630,8 @@ namespace CompassVO.ViewModel public RelayCommand MainPageLoaded { get; set; } public RelayCommand AcceptDialEdit { get; set; } public RelayCommand SendFeedbackCommand { get; set; } + public RelayCommand PrivacyPolicyCommand { get; set; } + public RelayCommand RateMeCommand { get; set; } public RelayCommand OpenWebPageCommand { get; set; } public RelayCommand OpenWebPageVOCommand { get; set; } @@ -677,6 +679,7 @@ namespace CompassVO.ViewModel MainPageLoaded = new RelayCommand(() => MainPageLoadedAction()); AcceptDialEdit = new RelayCommand(() => AcceptDialEditAction()); SendFeedbackCommand = new RelayCommand(() => SendFeedbackAction()); + PrivacyPolicyCommand = new RelayCommand(() => PrivacyPolicyAction()); RateMeCommand = new RelayCommand(() => RateMeAction()); OpenWebPageCommand = new RelayCommand(() => OpenWebPageAction()); OpenWebPageVOCommand = new RelayCommand(() => OpenWebPageVOAction()); @@ -846,6 +849,11 @@ namespace CompassVO.ViewModel emailTask.Show(); } + private void PrivacyPolicyAction() + { + App.Locator.NavigationService.NavigateTo(new Uri("/PrivacyPolicy.xaml", UriKind.Relative)); + } + private void RateMeAction() { try diff --git a/_media/store/CompassVO_Release_AnyCPU_1.2.xap b/_media/store/CompassVO_Release_AnyCPU_1.2.xap index 0e0a0be..3a03d26 100644 Binary files a/_media/store/CompassVO_Release_AnyCPU_1.2.xap and b/_media/store/CompassVO_Release_AnyCPU_1.2.xap differ