Compilación de aplicación

Learn about advanced setups from our how-tos.

Cómo integrar kits SDK en proyectos para aplicaciones Android

Recomendaciones

When developing projects for Android applications, follow these recommendations:

  1. Set up native authentication via social networks.

Nota
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.
Nota
You can disable sending of registration confirmation emails if your security principles allow it. Contact your Account Manager to disable it, or email csm@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 Unity customization instruction 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.
  1. Go to Publisher Account.
  2. To set up returning users to the application after they confirm registration:
    1. Go to your project and click Open in the Login block.
    2. Go to Login projects.
    3. Click Open and set up.
    4. Go to the URL block, specify Callback URL (a URL address or a path a user is redirected to after successful authentication, email confirmation, or password reset), and click Save changes.
  1. To set up user redirection to your application after making a payment via an external browser:
    1. Go to your project and click Open in the Pay Station block.
    2. Go to Settings.
    3. Specify the required parameters in the Redirect policy section and click Save.
  1. Manually create the AndroidManifest.xml file with the code below. Specify:
    • Callback URL divided into 3 parts. The example for https://example.com/callback is below.
    • Return URL (a URL address or a path a user is redirected to after making a payment) divided into 3 parts. The example for https://example.com/return is below.
Copy
Full screen
Small screen
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <application>
        <activity
            android:name="com.unity3d.player.UnityPlayerActivity"
            android:label="@string/app_name"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <data android:scheme="https" />
                <data android:host="example.com" />
                <data android:pathPrefix="/callback" />

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

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
            <intent-filter>
                <data android:scheme="https" />
                <data android:host="example.com" />
                <data android:pathPrefix="/return" />

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

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>
    </application>
</manifest>
Nota
If you want to set up user redirection to your application for only one case, delete the intent-filter block with the corresponding parameters from the code.
  1. Place the created file in the Assets/Plugins/Android folder of your Unity project.
¿Te ha resultado útil este artículo?
¡Gracias!
¿Hay algo en lo que podamos mejorar? Mensaje
Lo sentimos
Por favor, cuéntanos por qué no te ha resultado útil este artículo. Mensaje
¡Gracias por tu mensaje!
Nos ayudará a mejorar tu experiencia.
Ocultar

Cómo crear una compilación de aplicación para que se ejecute en un navegador

Create a WebGL build to run your application in a browser.

Select the Unity WebGL component when installing Unity Editor. To add a module to an already installed Unity Editor, run the installer for your version and select the missing components.

Compilación WebGL de demostración
Ver la demostración en un navegador.

To create a WebGL build:

  1. Open your Unity project.
  2. Go to File > Build settings.
  3. In the Platform panel, select WebGL.
  4. Select build type (optional).
  5. Click Build and Run.

Nota
Not all Unity features are available in WebGL builds. See the Unity documentation for limitations.

For the payment interface to work correctly, open it in an iframe. To do this, call the Purchase method of the Assets > Xsolla > Plugins > paystation JS library following the Unity instructions.

Seguir leyendo

¿Te ha resultado útil este artículo?
¡Gracias!
¿Hay algo en lo que podamos mejorar? Mensaje
Lo sentimos
Por favor, cuéntanos por qué no te ha resultado útil este artículo. Mensaje
¡Gracias por tu mensaje!
Nos ayudará a mejorar tu experiencia.
Ocultar
Última actualización: 10 de Octubre de 2023

¿Has encontrado una errata u otro error de texto? Selecciona el texto y pulsa Ctrl+Intro.

Informar de un problema
Nos esforzamos por ofrecer contenido de calidad. Tus comentarios nos ayudan a mejorar.
Déjanos tu correo electrónico para que te podamos responder
¡Gracias por tu mensaje!