2 Replies Latest reply on Feb 4, 2009 3:34 AM by david deraedt

    Setting up an AIR app to require a registration code?

      As the title suggests, I'm trying to figure out a way to setup an AIR application to require a registration code. I suspect this is fairly simple and I'm just missing something. While I've developed in Flash for a while, this is the first time I'm doing AIR. Specifically I'd like to let the user DL one of my games, and it would run in demo mode (just the first couple of levels) until they register. Ideally they would then get a code from me that was tied to their email address.

      Thanks in advance for any help, or pointers to where there is an answer already posted.
        • 1. Re: Setting up an AIR app to require a registration code?
          anirudhs Level 2
          Hi NaweG,

          There's no built-in functionality to do this. You'd have to write code to handle it.

          I do know of an AIR app that works similiarly (and has made lots of money): Balsamiq mockups http://www.balsamiq.com/products/mockups
          • 2. Re: Setting up an AIR app to require a registration code?
            david deraedt
            Hi NaweG,

            I wouldn't call this topic "simple". There are countless strategies that can help you deal with this kind of issue, depending on your requirements, each having pros and cons. Therefore, it cannot be the runtime responsibility to deal with it. It's yours.

            For example, you can put in place a webpage on your website which will take the user credentials and return a key that can be authenticated, or validated by your program. The application could store this key pretty much anywhere. The advantage of this technique is that the users can then both register and use their application offline. However, you application can be decompiled and your key authentication algorithm be reverse engineered.

            Another strategy would be to have the authentication logic serverside. Your AIR application would have a simple registration form, in which the users would enter their credentials, and the program would send those to a remote service which would basically just give a yes or no answer. In that case, you either require your user to authenticate each time they use the software, or you'll then have to store that answer somewhere safe.

            I would suggest using the EncryptedLocalStore to help you deal with licencing issues. It has the benefit to be completely invisible to the user, and to remain on the system even if the application is uninstalled. This way, it can prevent the user from, say, uninstall the application and install it again to reset licencing data, which can be very convenient for trials.

            Again these are just some strategies I can think of...