AppAdditives PromotionalCodes, Telerik trial reminder and how to let users unlock the full app on Windows Phone

I love it when I am discovering new awesome stuff to provide a unique User Experience in my apps. AppAdditives by ExGrip LLC are the newest tools I felt in love with.

AppAdditives allow you to create promo images, social cards and widgets for your blog very easy. On top of that, they provide you an easy to use promotional code system. According to their developers, they are planning even more awesome stuff for Windows Phone and Windows 8 in future to help especially small and indie developers/publishers.

Let’s have a look on how easy it is to generate a list of promo codes after you registered for their free service.

Screenshot (332)

To generate a new list of promo codes, click on Promotional Codes. Then choose which way you provide – one time codes (every code gets invalid after being redeemed) or multi-user codes (one code for up to 2 million users). I am using the one time codes for my app.

Screenshot (330)

After you selected the proper time zone, you will get the following settings menu:

settingsforpromocodes

 

Enter all your settings, and click on start to generate your list of promo codes. It will look like this:

Screenshot (331)

That’s all we need to do here. Let’s fire up Visual Studio. Open NuGet, and install the package ‘ExGrip.PromotionalCodes’ in your preferred way.

First, add your API Key and API Secret to your app (you will find them on the Promotional Codes page). Then, add the following code to your button/function that will redeem the code for your users:

            if (PromoCodeTextBox.Text != string.Empty)
            {
                PromotionCodeManager promoCodeMan = new PromotionCodeManager(AppAdditivesAPIKey, AppAdditivesAPISecret);

                bool validateCode = await promoCodeMan.ValidatePromoCode(this.PromoCodeTextBox.Text);

                if (validateCode == true)
                {
                    progress.Text = "redeeming promo code...";

                    bool redeemCode = await promoCodeMan.RedeemPromoCode(this.PromoCodeTextBox.Text);

                    if (redeemCode == true)
                    {
                        App.isPromoCodeActivated = true;

                        RedeemPromoCodeWindow.IsOpen = false;
                        redeemPromoCode.IsEnabled = false;

                        await RadMessageBox.ShowAsync("You unlocked the full version.", "Success", MessageBoxButtons.OK);

                    }
                    else
                    {
                        await RadMessageBox.ShowAsync("The code you entered cannot be redeemed. Please try again or contact our support.", "unable to redeem your code", MessageBoxButtons.OK);
                    }
                }
                else
                {
                    await RadMessageBox.ShowAsync("The code you entered is not valid. Please try again.", "invalid promo code", MessageBoxButtons.OK);
                }
            }
        }

As you can see, I am using an chain to first validate the promo code, and only if it is valid, I allow to redeem the code.

But that’s not all. I am using Telerik’s RadTrialApplicationReminder to manage the trial state of my app. Windows Phone does not allow to redeem a code for a full version via the Store, so we need to be creative here.

As I am not limiting features but use a time based trial, I can use three already existing properties of RadTrialApplicationReminder. If my Boolean is true after the app start, I am setting all periods to 9999 days and skip all further reminders:

                if (isPromoCodeActivated == true)
                {
                    trialReminder.FreePeriod = TimeSpan.FromDays(9999);
                    trialReminder.OccurrencePeriod = TimeSpan.FromDays(9999);
                    trialReminder.AllowedTrialPeriod = TimeSpan.FromDays(9999);
                    trialReminder.AreFurtherRemindersSkipped = true;
                }

This way, I can easily provide this clearly missing features by using Promotional Codes from AppAdditives. The only thing I need to do is to tell users to only download the trial version of my app and give them a promo code.

Additional hint: If you have users that switch devices, they are not able to redeem the code again. Just tell that to your users, they will be either asking you for another code – or buy your app, anyways.

As always, I hope this post is helpful for some of you.

Happy coding, everyone!

Comments 6
  1. Hello Marco! We want to thank you so much for blogging this! We would like to add your blog-post to our documentation as a quick-start/introduction to Promotional Codes. What do you think?

  2. Hi Marco this is a really usefull tutorial for all apps that have trial mode. I have just one question i have an similar method in my app, selfmade stuff.

    Soemthing like an xml file on a Server and if the users clicks ok to redeem some code that he/she entered it checks for the same code, if its the same code i have then made a method that just saves an _isTrial bool to the IsolatedStorageSettings as false; this i check on the app start to see if its true or false. and currently it works.

    But i wanted to ask is this approach here a better solution?! in terms of using the rad controls too to manage the trial state, and so on. Does the rad trial reminder do the same with the _isTrial bool like i do, or how does it save the file?!

    Thank you.

    1. Hi Dino,

      AppAdditives habdlesvall the server stuff for me, but has its limitations.

      I am using RadTrialReminder because it’s a convinient way to handle the reminders for me. I have also a self made solution running in TweeCoMinder, where i save a bool value in the SQL table of my mobile service on Azure. both ways are good and working like does yours.

      I hope this helps.

Join the discussion right now!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Prev
[Update 3] UserVoice WP8 library for user features

[Update 3] UserVoice WP8 library for user features

Next
How to create a time based & cancelable BackgroundWorker for Windows Phone (and others)

How to create a time based & cancelable BackgroundWorker for Windows Phone (and others)

You May Also Like

This website uses cookies. By continuing to use this site, you accept the use of cookies.  Learn more