Enterprise-level SDKs for Android / Initialize library
  Back to Docs

Enterprise-level SDKs for Android

Initialize library

To initialize the library, add the following lines to your Android project source code according to the application logic (e.g., at application startup):

Copy
Full screen
Small screen
XSubscriptions.init(projectId, sandbox = true)
XSubscriptions.authenticate(token)

In the projectId parameter of the XSubscriptions.init method, pass the project ID, which can be found in the Publisher Account next to the name of your project.

Note

The sandbox parameter of the XSubscriptions.init method is responsible for choosing sandbox or live mode for payment processing.

For testing, pass sandbox = true. After launching the project for the release version of your application, change the value to sandbox = false.

In the token parameter of the XSubscriptions.authenticate method, pass the user’s JWT received during authorization in the application.
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.
Last updated: January 22, 2024

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!