SDKs for Android / Player inventory
 Back to Docs

SDKs for Android

  • Login library

  • Store library

  • Inventory library

  • Payments library

  • Subscriptions library

  • Authentication

  • Catalog

  • Promotions

  • Item purchase

  • Player inventory

  • User account and attributes

  • General information

    The player inventory contains the user’s items that they bought or received according to the game logic.

    Note
    When buying or receiving a bundle, items that are a part of the bundle are added to the inventory. No additional steps are required to unpack the bundle.

    The inventory solution is based on the In-Game Store product. After a successful purchase, items are added to the player inventory automatically on the Xsolla side. To grant items without a purchase (for example, when reaching a certain level), use the Grant items to users API method in the back end of your application.

    Users are identified via the authentication system based on the Login product. If you have configured your own authentication system, you can use a user JWT for client methods.

    How-tos

    Learn about advanced setups from our how-tos.

    How to use in-game store site with SDKs

    Notice
    Use this how-to when working with the following libraries:
    • Payments
    • Inventory

    Implement the sale of virtual items and virtual currency outside the game via the store site. The purchased items and currency will be available in the player’s inventory.

    To integrate your store site with the SDK:

    1. Create a store site.
    2. Specify the site address of the in-game store in the application code.
    3. Implement the logic for your application to work with the store site.

    Create a store site

    You can create a store site with Site Builder by following the instructions for connecting a store on the site.

    Notice
    By default, when creating a site, a new Login project is created in Publisher Account. When setting up Site Builder, use the same Login project as when you set up the SDK.

    If you want to connect a store site that was created using a different solution, follow the instructions for creating a store.

    Recommendations for the logic for your application to work with the store site

    Follow these recommendations when developing your application:

    1. Synchronize the fields of user registration and authorization in your application and in the Login widget on the store site:
      • If a user email and password are used for registration and authorization, set the username equal to the email in the application.

    Note
    The widget uses the user’s email and password by default for authorization and registration.

      • If you use a username, user email and password for registration and authorization, contact your Account Manager to change the Login widget fields.

    1. When navigating to the store site from the application client, implement pass-through user authorization. To do this, the user token must be passed in the URL parameters. An example of authorization is shown in the demo app.

    Was this article helpful?
    Thank you!
    Is there anything we can improve? Message
    We’re sorry to hear that
    Please explain why this article wasn’t helpful to you. Message
    Thank you for your feedback!
    We’ll review your message and use it to help us improve your experience.
    Hide

    Continue reading

    Last updated: August 24, 2022

    Found a typo or other text error? Select the text and press Ctrl+Enter.

    Report a problem
    We always review our content. Your feedback helps us improve it.
    Provide an email so we can follow up
    Thank you for your feedback!