How to detect whether the game has been purchased offline.

If a game is divided Lite version and licensed version, licensed version will need to purchase.If I have been purchased, how to detect offline

Comments

  • Killa_MaakiKilla_Maaki Posts: 504Member
    Referring to the OUYA developer documentation, it shows how to get a list of item receipts the player has purchased. You can check if the "full game" item is in the receipts and if so the player has indeed purchased the game.
    If you want to make sure the game works even without an internet connection, when the user purchases the "full game" item you can then store something akin to a license file, perhaps store the user's UUID in a file somewhere and then you can compare the contents of the file to the user's UUID (if they match the user has indeed purchased the game). The UUID is unique to that player, and is also unique from one game to the next, which makes it a bit more difficult to easily spoof, for example by a hacker creating a fake "game" that reports the UUID (since their "game" is different it will report a different ID than your game).
    You didn't remember the plot of the Doctor Who movie because there was none; Just a bunch of plot holes strung together.
  • liuyangliuyang Posts: 3Member
    If the license is recorded locally, I was afraid that others clone this game.
  • KonajuGamesKonajuGames Posts: 560Member
    A purchase cannot be made while offline.  The OUYA must be connected to the Internet for purchase to work.
  • arcticdogarcticdog Posts: 235Member
    @liuyang - Killa is suggesting that you cache the purchases locally and encrypt it by user id.  That way a "clone" of the license file would only successfully decrypt for the user logged into the console that made the purchase.




Sign In or Register to comment.