Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Not licensed Android APK
Started by erick.spiegel89 Sep 26 2018 06:06 AM

2 replies to this topic
not licensed licensed licensing licensing init
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

erick.spiegel89

[GLOBAL: userInfoPane.html]
erick.spiegel89
  • Observer

  • 6 posts
  • Corona SDK

Im trying to send an apk with a obb file to the play store in google play console as beta test, but they told me that I have the "Not licensed" issue (screen attached)

 

When I run my app in debug and development mode everything runs ok, but when I sign the app with my store key and try to run the app I receive an native alert with the message "Not licensed" (screen attached)

 

Actually my app is in the store and I trying to send an update

 

I configure my beta testers in the console and the option for these testers is "LICENSED" (screen attached)

 

Corona Info:

Version 2018.3326 (2018.6.25)

 

I have the following code to check the license


local function licensingListener(event)
if not event.isVerified then -- Not a verified APK downloaded from the Google Play store
logger.warn("This instance is not verified")
end

 

end

 

local licensing = require("licensing")

if licensing.init("google") then
licensing.verify(licensingListener)
else
logger.warn("Licensing could not be init")
end
 
 

I configure my key in the config file and build file

Build settings file
settings =
{
    android =
    {
        usesPermissions =
        {
            "com.android.vending.CHECK_LICENSE"
        },
    },
}

config file
application =
{
    license =
    {
        google =
        {
            key = "MY KEY",
        },
    },
}

the licensing.init function never execute as success

 

The log prints the following message that I put in my code

 

logger.warn("Licensing could not be init")

Attached Files



[TOPIC: post.html]
#2

xnailbender

[GLOBAL: userInfoPane.html]
xnailbender
  • Contributor

  • 357 posts
  • Corona SDK

Erik,

 

This could be a few different things.

 

Are you testing on an old Android device?

 

Recently I discovered the "Licensing" api is broken and won't work with older Android Versions.  I believe my old Samsung Tab I use for testing has 4.4.4 on it.  

 

I submitted a bug report, but don't believe it was ever fixed for older versions, I'm told "Licensing" works on recent versions.

 

If an old Android version isn't your problem, then I believe you have to upload your beta update to the Play Store before Google will verify "Licensing".

 

I could be wrong on this, but I believe you need to download the update from the Play Store onto your device before the license will be accepted.  After you download the update from the Play Store and launch it, you can modify it and load it directly to your device afterwards.  At least this method has worked for me, others I'm sure will chime in with their experience.

 

I change my store description slightly to make sure I'm downloading the update from the Play Store.  There is some delay for the update to be available to Beta testers in the Play Store from my experience.

 

Hope this helps,

 

Nail



[TOPIC: post.html]
#3

erick.spiegel89

[GLOBAL: userInfoPane.html]
erick.spiegel89
  • Observer

  • 6 posts
  • Corona SDK

Thank you for your answer

 

We already tried on different Android versions and devices and it happens.

 

We uploaded beta and weren't released because of this issue.

 

Probably is a configuration in the "google play console" we haven't found it yet




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: not licensed, licensed, licensing, licensing init