How to integrate SDKs in projects for Android applications

Recommendations

When developing projects for Android applications, follow these recommendations:

  1. Set up native authentication via social networks.

Note
Currently, native authentication is supported by the following social networks:
  • Google
  • Facebook
Use the WebView tool to set up native authentication for other social networks.

  1. Set up deep links to return users to the application after they confirm registration via email.
  2. Customize registration confirmation email.

Note
You can disable sending of registration confirmation emails if your security principles allow it. Contact your Account Manager to disable it, or email am@xsolla.com.

  1. Choose and set up the most suitable method of working with an in-game store. If you wish, you don’t have to implement the cart feature in your game. Instead, implement the ability to make an in-game purchase by clicking the Buy button.
  2. Set up user redirection to your application after making a payment via an external browser.
  3. Follow the UMG UI documentation to customize the UI for errors and pop-ups. Errors and pop-ups in the integration demo are created for game developers. Therefore, make them more suitable for the end users of your application.

To set up user redirection to your application after they make a payment via an external browser:

  1. Open your project in Publisher Account.
  2. Click Pay Station in the side menu.
  3. Go to the Settings tab.
  4. Specify the required parameters in the Redirect policy section.
  5. Click Save.

Note
The return URL (the path in the application the user is redirected to after making a payment) must match the scheme app://xpayment.<ANDROID_PACKAGE_NAME>, where <ANDROID_PACKAGE_NAME> is the package name of the Android application.

  1. Go to your UE4 project.
  2. Go to Settings > Project Settings > Plugins > Xsolla Store.
  3. Check the Use Deep Linking box and in the Redirect URL field, enter the return URL (a URL address or a path a user is redirected to after making a payment) specified in the Publisher Account.

To set up returning users to the application after they confirm registration:

  1. Open your project in Publisher Account.
  2. Click Login in the side menu.
  3. Select the Login project and click Configure.
  4. On the navigation page, go to the Security block and select the OAuth 2.0 section.
  5. Click on the pencil icon in the line of the required OAuth 2.0 client.
  6. Specify an OAuth 2.0 redirect URI (a path in the application the user is redirected to after successful authentication, email confirmation, or password reset). You can specify multiple valid URIs.
  7. Click Save changes.

Note
The URI must match the app://xlogin.<ANDROID_PACKAGE_NAME> scheme, where <ANDROID_PACKAGE_NAME> is the package name of the Android application.

  1. Go to your UE4 project.
  2. Go to Settings > Project Settings > Platforms > Android > Advanced APK Packaging.
  3. Enter the code below in the Extra Settings for section (/n to separate lines) field. In the code, specify the URI divided into parts. The example below is for app://xlogin.com.xsolla.android.example.

Copy
Full screen
Small screen
<intent-filter>
     <data android:scheme="app" />
     <data android:host="xlogin.com.xsolla.android.example" />

     <action android:name="android.intent.action.VIEW" />

     <category android:name="android.intent.category.DEFAULT" />
     <category android:name="android.intent.category.BROWSABLE" />
 </intent-filter>

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.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: June 6, 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!