Mr. Gestures 1.5.2 GestureSample.Droid example fails on license key check

I am trying to run the current GestureSample.Droid example, using Mr.Gestures 1.5.2, without making any changes. It fails in GestureSample.Droid.MainActivity.cs file, line:

MR.Gestures.Android.Settings.LicenseKey = "ALZ9-BPVU-XQ35-CEBG-5ZRR-URJQ-ED5U-TSY8-6THP-3GVU-JW8Z-RZGE-CQW6"; // key for GestureSample

with the error:
Unhandled Exception:

System.ApplicationException: The LicenseKey 'ALZ9-BPVU-XQ35-CEBG-5ZRR-URJQ-ED5U-TSY8-6THP-3GVU-JW8Z-RZGE-CQW6' is not for the app 'GestureSample.Droid'.

But in the same solution, the GestureSample.UWP project runs, using exactly the same license key. Also, if I run a version of the GestureSample.Droid from the summer of 2017, version 1.4.1), the GestureSample.Droid project works fine. It too uses exactly the same license key.

Anybody have any ideas?

Best Answer

  • OldTMQOldTMQ ✭✭
    Accepted Answer

    The Mr.Gestures developer Michael Rumpler sent me a fix to this problem. It is quoted below.

    "In version 1.5.2 I changed the way how I get the app name. It seems like this does not work in all circumstances. Please add the app name (which you configured in your ActivityAttribute) also to the Properties/AndroidManifest.xml. Add the android:label attribute to the application element like I did for the GestureSample.
    NOTE: this forum does not allow me to post a URL, so I inserted "..." in place of the url for xmlns:android. Make sure you leave your original URL intact.

     <?xml version="1.0" encoding="utf-8"?> 
     <manifest xmlns:android="..." android:installLocation="auto"> 
        <uses-sdk android:minSdkVersion="15" /> 
        <application android:icon="@drawable/icon"></application> 
        <application android:label="GestureSample" android:icon="@drawable/icon"></application> 
     </manifest>
    

    I will change the code in the next version of MR.Gestures so that this will not be necessary anymore. "

    This fix worked for me and I was able to update my project to Mr.Gestures 1.5.2 and have everything work as expected.

Answers

  • OldTMQOldTMQ Member ✭✭

    I also converted an existing project of my own, which worked perfectly using Mr.Gestures 1.4.1, to use Mr.Gestures 1.5.2, and it too fails on the exact same line, setting the LicenseKey to the string "ALZ9-BPVU-XQ35-CEBG-5ZRR-URJQ-ED5U-TSY8-6THP-3GVU-JW8Z-RZGE-CQW6".

    I set the Activity Label property of the Android MainActivity file to "GestureSample", exactly as described in the Mr.Gestures documentation. That is why the same project worked using Mr.Gestures 1.4.1

    [Activity (Label = "GestureSample", ...

    There definitely seems to be something wrong with the Mr.Gestures Android LicenseKey verification.

  • OldTMQOldTMQ Member ✭✭

    I received a reply from the Mr.Gestures developer Michael Rumpler.

    "in version 1.5.2 I changed the way how I get the app name. It seems like this does not work in all circumstances. Please add the app name (which you configured in your ActivityAttribute) also to the Properties/AndroidManifest.xml. Add the android:label attribute to the application element like I did for the GestureSample.

    Note: This forum will not allow me to post links, so I had to replace hyperlinks in the AndroidManifest file with "...". Make sure you leave the original _xmlns:android link in place.

    GestureSample/GestureSample.Droid/Properties/AndroidManifest.xml

         <?xml version="1.0" encoding="utf-8"?> 
         <manifest xmlns:android= ... > 
            <uses-sdk android:minSdkVersion="15" /> 
            <application android:icon="@drawable/icon"></application> 
            <application android:label="GestureSample" android:icon="@drawable/icon"></application> 
         </manifest> 
    

    I will change the code in the next version of MR.Gestures so that this will not be necessary anymore. "

    This worked in my application. All I did was change my Android.Manifest file in the Android project of the Solution to also set the android:label tag to match that of the licensed name for the applicaiton. In the example below, it is GestureSample because I am using the trial version of Mr.Gestures, and the license key for that is tied to the application name GestureSample.

    Note: This forum will not allow me to post links, so I had to replace hyperlinks in the AndroidManifest file with "...". Make sure you leave the original _xmlns:android link in place.

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android=...>
        <uses-sdk android:minSdkVersion="15" />
      <application android:label="GestureSample" android:icon="@drawable/icon"></application>
    </manifest>
    
  • OldTMQOldTMQ Member ✭✭
    Accepted Answer

    The Mr.Gestures developer Michael Rumpler sent me a fix to this problem. It is quoted below.

    "In version 1.5.2 I changed the way how I get the app name. It seems like this does not work in all circumstances. Please add the app name (which you configured in your ActivityAttribute) also to the Properties/AndroidManifest.xml. Add the android:label attribute to the application element like I did for the GestureSample.
    NOTE: this forum does not allow me to post a URL, so I inserted "..." in place of the url for xmlns:android. Make sure you leave your original URL intact.

     <?xml version="1.0" encoding="utf-8"?> 
     <manifest xmlns:android="..." android:installLocation="auto"> 
        <uses-sdk android:minSdkVersion="15" /> 
        <application android:icon="@drawable/icon"></application> 
        <application android:label="GestureSample" android:icon="@drawable/icon"></application> 
     </manifest>
    

    I will change the code in the next version of MR.Gestures so that this will not be necessary anymore. "

    This fix worked for me and I was able to update my project to Mr.Gestures 1.5.2 and have everything work as expected.

  • DeepakDYDeepakDY INMember ✭✭
    edited September 1

    Hello @MichaelRumpler, @OldTMQ

    I am facing same problem, i tried given solution but not work for me.

    how can get correct Licence Kye
    i used this.

    MR.Gestures.Android.Settings.LicenseKey = "ALZ9-BPVU-XQ35-CEBG-5ZRR-URJQ-ED5U-TSY8-6THP-3GVU-JW8Z-RZGE-CQW6"

Sign In or Register to comment.