Google Play Application Verification Plugin Issue

I’m currently trying to get this the ‘Google Play Application Verification’ Plugin (http://u3d.as/content/unity-technologies/google-play-application-license-verification/2Qr) working in a blank project on Unity.

Right now the issue is that it never properly detects it’s on a device, CheckLVLButton.cs, line 39, new AndroidJavaClass(“android.os.Build”).GetRawClass() != System.IntPtr.Zero; always returns false.

I’m working on a mac, using Unity 4, have imported the package and declared my LVL. When I build the project I do not create an eclipse layer, nor is it debuggable. I just transfer the apk to my device and install.

I’ve found the read me on gitHub (GitHub - Unity-Technologies/GooglePlayLicenseVerification: Unity Android plugin example on how to interface the Google Play License Verification (LVL) servers) but this provides no additional information to me on extra steps that need to be taken, at least to my knowledge and with Unity.

I’ve been looking for a while now and found no detailed solution to this problem. Perhaps someone could give me the proper steps to just get the plugin working, then I can apply that to my actual project? Do I need to do something with some other program besides Unity?

Any help is greatly appreciated.

I’ve tried following the steps to recompile the Java Source, but I’ve run into problems during that process. I also updated my Android SDK and installed the Licensing Library to no avail. Just bypassing the check and setting the check if android device to true allows me to click the button but it returns 3 as the response with no data filled in any of the other items. I’m sure that this problem isn’t the only one, but I have no idea what libraries or other aspects are missing to make this License Verification possible.

I’ve found that my issue lies with RSA.SimpleParseASN1(m_PublicKey_Base64, ref m_PublicKey.Modulus, ref m_PublicKey.Exponent); in Start(). This most likely errors out and causes the rest of the code to not run, not letting it detect if it’s on a device. I also did eventually get through the Recompiling, but I’m not sure if this necessary.

Still working on resolving some issues, as the program was returning the proper value for a while, but now only return response codes of 257 and Failed package names.