Using ta.GetFeatureValueAnswered

Hi, we have some features in our application that we sell as ‘premium features". So we’ve created a feature called ‘LimitPremium' in our product, that suppose to check just that. However we noticed that after software updates (reinstalling the application) the feature was value has returned True (i.e. - limited) when it shouldn't. After another reactivation (deactivation and activation) it returned False (the correct value).


we've had problems locating the problem and even recreating it. Finally I've find out that something: it seems that the “GetFeatureValue” doesn't return the updated value (after it has changed within the “DaysBetweenChecks”. 


This is our code (follow up explanations afterwards): 
 

                IsGenuineResult gr = ta.IsGenuine(30, 14, false);

                IsGenuine = gr == IsGenuineResult.Genuine ||
                            gr == IsGenuineResult.GenuineFeaturesChanged ||

                            // an internet error means the user is activated but
                            // TurboActivate failed to contact the LimeLM servers
                            gr == IsGenuineResult.InternetError;


                if (IsGenuine)
                {
                    if (ta.IsDateValid(ta.GetFeatureValue("License_Expires"), TA_DateCheckFlags.TA_HAS_NOT_EXPIRED) == false)
                    {
                        IsGenuine = false;
                        LimitPremium = true;
                        ta.Deactivate(true);
                    }
                    // check if user has purchased premium extension
                    string value = ta.GetFeatureValue("LimitPremium");
                    LimitPremium = value == "1" ? true : false;
                }


So, using the code above, I've activated and application and didn't limit the premium feature. afterwards I did limit the premium feature, and started the app again. I saw that GetFeatureValue remained the same old value (that did not limit premium). 

So my question is if “GetFeatureValue” somehow dependent in the DaysBetweenCheck? 

note: the scenario that I'm trying to fix is that clients are limited from using the premium features even though they sholdn't be. 

Answer

Getting the updated fields in your app is covered at length in the custom license fields article: https://wyday.com/limelm/help/license-features/#change