Esempio n. 1
0
        public GoogleTalk()
        {
            LoggedIn = false;

            var uri            = new Uri(GoogleTalkHelper.IsPaid() ? "PlusApiKey.txt" : "ApiKey.txt", UriKind.RelativeOrAbsolute);
            var resourceStream = App.GetResourceStream(uri);

            using (var sr = new StreamReader(resourceStream.Stream)) {
                ApiKey = sr.ReadLine().Trim();
            }
        }
Esempio n. 2
0
 private void SetLicenseNotice()
 {
     if (GoogleTalkHelper.IsPaid())
     {
         PaidVersionNotice.FontSize = (double)App.Current.Resources["PhoneFontSizeMedium"];
         FreeVersionNotice.FontSize = 0.1;
     }
     else
     {
         FreeVersionNotice.FontSize = (double)App.Current.Resources["PhoneFontSizeMedium"];
         PaidVersionNotice.FontSize = 0.1;
     }
 }
Esempio n. 3
0
        private void InitAnalytics()
        {
            // Init flurry analytics
            var    uri            = new Uri("FlurryApiKey.txt", UriKind.RelativeOrAbsolute);
            var    resourceStream = App.GetResourceStream(uri);
            string apikey;

            if (resourceStream != null)
            {
                using (var sr = new StreamReader(resourceStream.Stream)) {
                    apikey = sr.ReadLine().Trim();
                }

                FlurryWP7SDK.Api.StartSession(apikey);
                FlurryWP7SDK.Api.SetSecureTransportEnabled();
                FlurryWP7SDK.Api.SetVersion(String.Format("{0} {1}", AppResources.AppName, AppResources.AppVersion));
                if (GoogleTalkHelper.IsPaid())
                {
                    FlurryWP7SDK.Api.LogEvent("Paid user");
                }
            }
        }