Hello,

I have implemented the android license system in a paid application
that I am developing. I have uploaded the app but not published it,
and I am testing the license system. The policy I am using is
ServerManagedPolicy.

When I execute the app from the emulator, server responses I am not
allowed (I thing that's correct), but when I execute the app in an
android mobile (not the one that is registered with my google account,
another one), server responses that the mobile phone is allowed to
execute the app (At least I suppose that, because if not an alert
should appears).

Is it correct? I think that it shouldn't, because that mobile hasn't
bought the app. Could it be because I have not published the app yet?
But in that case, the emulator should be allowed as well...

This is the code used to check the license:

    mLicenseCheckerCallback = new ComprobadorLicencia();

    String deviceId = Secure.getString(getContentResolver(),
Secure.ANDROID_ID);
    // Construct the LicenseChecker with a Policy.
    mChecker = new LicenseChecker(
        this,
        new ServerManagedPolicy(this, new
AESObfuscator(Constantes.SALT, getPackageName(), deviceId)
        ),
        Constantes.clave_publica_licencia
    );

    mChecker.checkAccess(mLicenseCheckerCallback);

    private class ComprobadorLicencia implements
LicenseCheckerCallback
    {
        public void allow()
        {
            if (isFinishing())
            {
                // Don't update UI if Activity is finishing.
                return;
            }
        }

        public void dontAllow()
        {
            if (isFinishing())
            {
                // Don't update UI if Activity is finishing.
                return;
            }
            showDialog(0);
        }
    }

The showDialog warns the user and then the application closes itself.

Could anyone explain me why the emulator is not allowed but the app
is?

Than you very much!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to