Search Unity

LVL check

Discussion in 'Android' started by unitynewb, Jan 21, 2013.

  1. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    Does anyone have any experience with the LVL check thats available in the unity store?

    I believe this is the responses I am looking for, but I want to confirm:
    0 = Valid user
    1 = Pirated user
    257 = No connection.

    I'm trying to determine if the user is valid. I don't plan on blocking them I just want to give them a message to support the developer and let them continue playing.

    So my question is more because I saw code 257. Does the user have to be online in order to check if their license is valid? I don't want the user to always be online in order to check.

    I guess I can have a prompt at the beggining of the game asking for an internet connection if the return code is 257 and there is no user id. Then from there I can just check for the user id because error 257 will continue to come up when the user is offline.
     
  2. DanTreble

    DanTreble

    Joined:
    Aug 31, 2010
    Posts:
    590
    Yes, they have to be online :-(
     
  3. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    243
    Am I right about code 1 being pirated. If so im not going to bother looking for 257 and just look for 1, but ill probably require an online connection on first launch to get the real code.

    What sucks is I did notice on one of my phomes the code always returned 257 so if somebody ran into that problem it would not let them get past that first activation screen.
     
  4. Fuzzy

    Fuzzy

    Joined:
    Feb 11, 2011
    Posts:
    266
    i used the LVL check in my last game because i got a request to make it save-able to the SD card what the basic copy protection just blocks. (i hope this is really safe)

    But the response codes should be:
    0 - LICENSED
    1 - NOT_LICENSED
    2 - LICENSED_OLD_KEY
    3 - ERROR_NOT_MARKET_MANAGED
    4 - ERROR_SERVER_FAILURE
    257 - ERROR_CONTACTING_SERVER
    258 - ERROR_INVALID_PACKAGE_NAME
    259 - ERROR_NON_MATCHING_UID

    You can always set test-responses from your android developer console profile and see if it's working with the smartphone that uses the same email-address as the google account uses. I guess that was how it worked.

    Downside of this:
    The user has to have an online connection to start your game.

    Benefits:
    If someone got an apk file of the game on whatever way, that's not hacked (if it's even possible to avoid this check via hack) you can just redirect them to the google play store at startup. :D
    The default copy protection when you set up your game for the google play store, just above where you set your price, can definitely be hacked, had to learn this.

    With the problem that it always returned 257, i think i had this one time too.
    My phone was running for weeks without a reboot, and i think after a reboot of the phone it was working.
     
  5. TSSTUDIOS

    TSSTUDIOS

    Joined:
    Jun 10, 2013
    Posts:
    15
    easy, set a player pref first time player runs game, if its licensed then jsut skip lincense check . for example just run license check withtin

    if (PlayerPrefs.GetStrin("LincenseStatus") == "Unlincensed")){
    }
    if (!PlayerPrefs.GetStrin("LincenseStatus") == "Licensed")){
    //thsi does if any lincenst status is other then lincesed
    }