Suddenly, licensing.init( "google" ) returns FALSE

Hi Brent, Yeah we’re talking about Google. For some reason I thought Google called it “Game Center Services”

I added Game Center for the iOS first and everything is already approved on the Apple side. It passed review :slight_smile:

Just a couple of days ago I started to prepare it for Google Play. I use the daily build pretty regularly so I was using 2015.2707 build when I added the licensing. Unfortunately, I’ve done all those suggestions. I checked it over and over about ten times lol.

Worst case, I will just leave out the license check. I’ve been reading that it pretty much does nothing to stop pirates and it just lulls you into a false sense of security. But I want to add it – believe me I’ll keep trying to get it to work.

Aloha @ Brent,

Hmmm. I think I know what I did wrong. I’ve been bypassing uploading my .APK builds to the Google Play Console and directly installing them on the device.

Would that cause the issue?

I’ll upload a new version .APK to the beta Google Play Console then, Maybe wait for 6 hours then and test it. I have to be patient and not bypass the uploading part.

Hi @burnsj002,

Well, I can’t speak for how Google does things, but what you describe seems fairly likely that it’s the root of the problem. Keep us posted please…

Brent

@Brent, I unpublished the game then a give it a dummy title. Then I created a new app in the Games Play Console and used the actually title of the game and new package name. I started fresh with a new license key … It thought for sure this would fix the problem.
It didn’t. Liscensing.init () still FAILS
I’m working blind unless I know why It returns false. Is there anyway to find out? What are all the finite reasons it can return false? Does Liscensing.init () function Contact Google ? I mean does it contact Google before the call to verify?
Also, do you think it’s the name of my game ? Or the beta tester e-mail?

Lastly I forgot to add the license permission check in my previous App and the Liscensing.init () didn’t fail – the verification failed. The callback listener would still be called. What I’m saying is it boggles my mind why it returns false. It’s not even calling the listener callback function .

Hi @burnsj002,

Can you check out the “Licensing” sample project to see if you’re doing things any differently? I’m quite confident that our sample has been tested and confirmed to work.

CoronaSDK-XXXX > SampleCode > Monetization > Licensing

Best regards,

Brent

@Brent, thanks for your help :slight_smile:

I took  the  CoronaSDK-XXXX > SampleCode > Monetization > Licensing and made a simple project on Google Play Console and uploading the .APK file. It also fails. Ugh.

At a hunch, I compiled the same code on my MacBook Pro for Android. And now it works perfectly!! Before I was using Windows to compile the code for Android.

Does this give you any insight in what the heck went wrong?

I guess for now I will only compile for Android on my MacbookPro.

Any thoughts on this?

When I build for Android on windows the  licensing.init( “google” ) returns FALSE

same exact code,

I build for Android on my MacBook Pro licensing.init( “google” ) returns TRUE

Hi @burnsj002,

The only other things I can think of are:

– You’re not signing the APK with the same keystore that you’re using on Mac.

– You’re not targeting the “Google Play” store in the build dialog (call system.getInfo(“targetAppStore”) to see what the built APK is really running with).

– You’re not building with the same “Version code” that the last APK uploaded to Google Play uses.

Brent

Aloha @Brent,

You’re right! Somehow I switched the target app store to “GameStick”

I feel so shame. Ugh.

Thanks for all you help