Monthly Archives: August 2014

Adding Nag-Screen for your apps

The wiktionary¬†definition for Nag Screen is “A message displayed by a nagware program to encourage the user to purchase the full version.” The Nag Screen could be useful when you have a LITE version of your app that user can test. However, you want to encourage user to purchase the full version.

Approach below shows you how to implement the Nag Screen for your apps.


Blocks Definition

Initially, we setup 3 global variables as follows:

  1. varTimesUsed – This variable holds total number of times that user has run the app
  2. varNagInterval – How often you want the Nag Screen (pop-up) to display. For example, if set to 5, it will display every 5-time usage of the app
  3. TAG_TIMES_USED – A tag variable that is used to retrieve and store data into our database

Next, in our Initialize block of the screen we:

  1. We attempt to get the total times app has been run. If 1st time (doesn’t exist), then we default to 0, otherwise we get the total number of times run.
  2. Next, increment the returned value by 1 and store it back to our varTimesUsed
  3. We then store the new incremented value into our database (use same tag as the one used to retrieve)
  4. We now use the modulo function to get the remainder when dividing varTimesUsed by varNagInterval. If remainder is zero, it means the varNagInterval time has been met and we need to display the Nag Screen
  5. Lastly, the IF control statement is used to check and see if remainder is 0.
  6. If zero, it means it is time to display the Nag Screen and we use a Notifier which displays the Nag AND total number of times the app has been used.
  7. If not-zero, we simply don’t do any thing.

Join AppyBuilder community at



Posted by on August 22, 2014 in Uncategorized


Any Component – Working with Advanced Features

App Inventor provides ability to set property of each component. For example, if you have 10 Buttons on your screen, you can set the visibility of each component as follows:

Button1.Visible to true, Button2.Visible to true and so on for all the buttons.

However, this would increase number of blocks and would be difficult to maintain. An alternative is to use the Advanced Features of App Inventor. Using “Any Component”, you can simplify setting property of the component (e.g. visibility, Enabled, etc) in a simple approach as below:


Looking for AiLiveComplete? See here:

Mobile App Development


Posted by on August 21, 2014 in Uncategorized

%d bloggers like this: