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

TrialApplicationReminder Not Working

1 Answer 13 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.
Ivan
Top achievements
Rank 1
Ivan asked on 15 Aug 2014, 01:56 PM
Hi. I've added the TrialApplicationReminder in my Windows Phone 8.0 app and have problems. I use the following sample code:
private static RadTrialApplicationReminder trialReminder;
public static RadTrialApplicationReminder TrialReminder {
    get {
        if (trialReminder != null) {
            return trialReminder;
        }
 
        return new RadTrialApplicationReminder() {
            AllowedTrialUsageCount = 5,
            FreeUsageCount = 2,
            OccurrenceUsageCount = 1,
            SimulateTrialInDebugMode = true,
            TrialReminderMessageBoxInfo = new MessageBoxInfoModel() {
                Buttons = MessageBoxButtons.YesNo,
                Content = AppResources.PleaseBuyThisApp,
                Title = AppResources.ApplicationTitle
            }
        };
    }
}
Added the ApplicationUsageHelper.Init( "1.9.6.5" ); in AppLaunch and ApplicationUsageHelper.OnApplicationActivated();
 in Activated.

I'm trying to debug (preview) the trial message box, but there are no message boxes. When I try to debug, I see that the trialReminder is always null at the moment of launch and the constructor is calling. What I need to do?

1 Answer, 1 is accepted

Sort by
0
Rosy Topchiyska
Telerik team
answered on 20 Aug 2014, 09:08 AM
Hello Ivan,

Thank you for the question.

From the provided information I suppose that the trialReminder field is initialized only in the getter of the TrialReminder property. If you use the trialReminder before ever calling the TrialReminder property, it will be null.

The messages/notifications should be displayed in some application page (MainPage for example), not in the App class. I have attached a sample project for demonstration.

I hope this helps. Please, let us know if you have further questions.

Regards,
Rosy Topchiyska
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TrialFeatureReminder
Asked by
Ivan
Top achievements
Rank 1
Answers by
Rosy Topchiyska
Telerik team
Share this question
or