Google Licensing check is not working

We were trying out licensing for Android to protect our app from piracy. After consulting the documentation we tried out the solution where we require the licensing plugin and then call init function with google as a param.

local licensingInit = licensing.init( "google" ) 
if ( licensingInit == true ) then
      licensing.verify( licensingListener )
end

We always get the licensingInit bool as false no matter how we download the app and thus the verification never takes place. For testing, I downloaded the live build of our app and then shared it across still no response from license checking. Does anybody know how to make the license checking work for android? @vlads

It is very weird.
Try calling verify without confirming the return value of init. Also, make sure config.lua has application.license.google.key value set. Also, you must target "google" store when building, otherwise it won’t work.
You can call verify without init succeeding. I am interested what it returns.

Ok, I tried by directly pass the listener in verify function

The problem is in the listener

if not ( event.isVerified ) then
    print("Verification failed") 
else 
    print ("App verified")
end

We are getting App verified even in test builds that I directly install on my Android device after making a build. Isn’t it supposed to print Verification failed because app is not from Google Play Store?

@vlads any suggestion on this? We have the licensing check code in live build of our app. I downloaded the app from google play and then transferred it onto another device through some apk sharing app, it still doesn’t warn about license checking after installing the app on another device and opening it. Wasn’t it supposed to fail the license check? Also, I don’t think it increments the download count on google play store. I am sure many devs would have had the same problem of their games being pirated, can anybody please suggest a workaround for piracy?

This is weird. Does other device has Google play with same account signed in? Try copying it on device where it would not have app licensed.

I was initing the service just above the license.verify function call so maybe the init requires some time to actually initialize the service. Can you please look into the issue of google analytics I have discussed in PM.

Apparently, here’s the issue We have been facing:

It came to our knowledge that Solar2D is now using Firebase analytics instead of legacy google analytics. Google Analytics is very comprehensive, offers more insight, is easy to understand and devs are more accustomed to using it.

The legacy plugin for the analytics would require a Tracking ID which is found in properties settings page on Google Analytics, this seems to have now been deprecated in the new plugin version because of which analytics are not showing up on the universal property and instead it is showing up on the Google Analytics 4 property page. This behaviour is quite understood since only GA4 property can be linked to the firebase account and not the Universal Property.

Due to these changes, most of our games have stopped showing proper analytics data and it might be a major setback for all other developers who have been using the analytics plugin in a legacy way in their apps which are already live. I hope you can understand how important it is for us devs. to process user data.

We request you to please provide the community with the legacy plugin as well so that all devs. who are accustomed to Google Analytics don’t have to move to different mediums for analytics.

1 Like

Thank you for you feedback on Google Analytics. I think we’ll put back google analytics and make new firebase analytics plugin… Sorry, it was not a great idea to break compatibility like that.

With regards to the licensing. I am testing new licensing v2 plugin, which uses Google’s licensing library. If you want to I can send it to you.

2 Likes

Thank you for taking the time to fix the problems we face and for the continued support to devs.

I would certainly like to try the new licensing plugin, let me know how to work with it.

Just an update Google analytics is reverted back to its original code base and does not use firebase. Will revert v1/old docs back to its original apis.

1 Like

Thank you for helping us out and fixing the plugin.