Simulating IsTrialMode property?

2 posts, 1 answers
  1. Shannon Stewart
    Shannon Stewart avatar
    1 posts
    Member since:
    Nov 2009

    Posted 29 Jul 2013 Link to this post

    I'm building an app where, during a trial period, I will display ads and only allow the user to save a single item to a list. The paid version will be ad-free and allow users to save multiple items. I would like the trial reminder to occur once a week, with the option to disable further reminders. I'm not sure what the best way to check if the application has been purchased, as the IsTrialExpired property only lets me know if the trial period has expired. Would the below configuration allow me to handle this situation. It seems like it will notify the user every time the app starts, and with testing that is what is happening. What's the best way to configure my requirements?

    var trialMessageBox = new MessageBoxInfoModel()
            Buttons = MessageBoxButtons.YesNo,
            Content = AppResource.App_TrialReminder_Text,
            SkipFurtherRemindersMessage = AppResource.App_TrialReminder_SkipMessage,
            Title = AppResource.App_TrialReminder_Title
    _TrialApplicationReminder = new RadTrialApplicationReminder
            AllowedTrialPeriod = TimeSpan.FromSeconds(1),
            FreePeriod = TimeSpan.FromSeconds(1),
            OccurrencePeriod = TimeSpan.FromDays(7),
            AllowUsersToSkipFurtherReminders = true,
    #if DEBUG
            SimulateTrialForTests = true,
            TrialReminderMessageBoxInfo = trialMessageBox,
            TrialExpiredMessageBoxInfo = trialMessageBox
  2. Answer
    Todor avatar
    772 posts

    Posted 30 Jul 2013 Link to this post

    Hello Shannon,

    The trial reminders automatically check if your application is purchased or it is in trial mode. The SimulateTrialForTests property helps you while you are testing your application and what it does is to skip the check if the application is paid and always display the reminder, so you have correctly set it to true only for the debug mode.

    The IsTrialExpired property is true only if the application is in trial mode and the trial has expired. When the application is purchased, IsTrialExpired is always false, so the better approach to check this is to use LicenseInformation.IsTrial.

    With your configuration, it seems that all of your requirements are met. If you want to understand more about the customization of the reminders, you can read this blog post.

    I hope this information helps.

    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
Back to Top