Example #1
0
 internal void EnterBackground()
 {
     // if using Streaming, processor needs to be reset
     if (Config.IsStreamingEnabled)
     {
         ClearUpdateProcessor();
         Config.IsStreamingEnabled = false;
         RestartUpdateProcessor();
         persister.Save(Constants.BACKGROUNDED_WHILE_STREAMING, "true");
     }
     else
     {
         PingPollingProcessor();
     }
 }
        void IUserFlagCache.CacheFlagsForUser(IDictionary <string, FeatureFlag> flags, User user)
        {
            var jsonString = JsonConvert.SerializeObject(flags);

            try
            {
                persister.Save(Constants.FLAGS_KEY_PREFIX + user.Key, jsonString);
            }
            catch (System.Exception ex)
            {
                Log.ErrorFormat("Couldn't set preferences on mobile device: '{0}'", ex, ex.Message);
            }
        }