This is a migrated thread and some comments may be shown as answers.

Problem using FeatureReminder

2 Answers 64 Views
TrialFeatureReminder
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 17 Feb 2012, 12:43 AM
Hi,
My Idea is to allow a base functionality in my app, but some feature should be disabled until the app is bought.
So I added the FeatureReminder to my app.

I tried to set the FeeUsageCount to null, 0 and 1, but no dialog is shown, when I call my "disabled" function.
When calling Notify(), no message is shown.
Testing for IsTrialExpired , value is always false.

return new RadTrialFeatureReminder()
               {
                   FeatureId = 1,
                   AllowedTrialUsageCount = 1, // maximum number of app runs until trial is expired
                   FreeUsageCount = 1, // number of app runs when no reminder will be displayed
                   OccurrenceUsageCount = 1 // reminder will be displayed on every run after the free usage is over
               };


So my questions:
- How I should implement it (Trial reminder should be shown after first use)?
- What are the init values for the reminder?
- What should I do, when the app is bought? Does the TrialFeauteReminder test the internal value IsTrail() ?


Thanks
Eric



2 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 17 Feb 2012, 10:04 AM
Hello Eric,

To enable the trial reminder the application should run in Trial mode. This is not the case when the application is not installed as a trial from marketplace. To simulate the trial mode you need to set the SimulateTrialForTests property to true (but please do it when DEBUG symbols are on, so you don't forget to remove it when you deploy your application to the marketplace).

Here is the full code needed. I'm also attaching a sample project for your reference. This is rather new feature so please let us know if you have any feedback.
public MainPage()
        {
            InitializeComponent();
 
            paidFeatureReminder = new RadTrialFeatureReminder()
            {
                FreeUsageCount = 0,
                AllowedTrialUsageCount =1,
                FeatureId = 1,
#if DEBUG
                SimulateTrialForTests = true
#endif
            };
 
            if (paidFeatureReminder.IsTrialExpired)
            {
                FeatureButton.IsEnabled = false;
            }
        }
 
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            paidFeatureReminder.UsageCount++;
            paidFeatureReminder.Notify();
 
            if (paidFeatureReminder.IsTrialExpired)
            {
                FeatureButton.IsEnabled = false;
                return;
            }
 
            // perform the feature actions
 
        }

Greetings,
Valentin.Stoychev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 17 Feb 2012, 11:39 AM
Hello Valentin,

Great, works like a charm.
I failed to see the use of "SimulateTrialForTests".

I started with the beta, now I'm using the release version.
My goal is to use all all the new building blocks.
What I have seen and implemented until now, is very useful.

Regards
Eric 

Tags
TrialFeatureReminder
Asked by
Eric Schoenholzer
Top achievements
Rank 2
Answers by
Valentin.Stoychev
Telerik team
Eric Schoenholzer
Top achievements
Rank 2
Share this question
or