Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. We're running great holiday deals on subscriptions, swag and Asset Store packages! Take a peek at this blog for more information!
    Dismiss Notice
  3. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  4. Unity 2017.2 is now released.
    Dismiss Notice
  5. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

LVL check

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

  1. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    234
    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:
    583
    Yes, they have to be online :-(
     
  3. unitynewb

    unitynewb

    Joined:
    Feb 22, 2009
    Posts:
    234
    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:
    253
    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
    }