Compilação do aplicativo

Learn about advanced setups from our how-tos.

Como integrar SDKs em projetos para aplicativos Android

Recomendações

When developing projects for Android applications, follow these recommendations:

  1. Set up native authentication via social networks.

Observação
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.
Observação
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>
Observação
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.
Este artigo foi útil?
Obrigado!
Podemos melhorar alguma coisa? Mensagem
Que pena ouvir isso
Explique porque este artigo não foi útil para você. Mensagem
Obrigado pelo seu feedback!
Avaliaremos sua mensagem e a usaremos para melhorar sua experiência.
Ocultar

Como criar uma compilação de aplicativo para ser executada em um 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.

Compilação WebGL demonstrativa
Veja a demonstração em um 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.

Observação
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.

Continuar lendo

Este artigo foi útil?
Obrigado!
Podemos melhorar alguma coisa? Mensagem
Que pena ouvir isso
Explique porque este artigo não foi útil para você. Mensagem
Obrigado pelo seu feedback!
Avaliaremos sua mensagem e a usaremos para melhorar sua experiência.
Ocultar
Última atualização: 10 de Outubro de 2023

Encontrou um erro de texto ou digitação? Selecione o texto e pressione Ctrl+Enter.

Relatar um problema
Nós sempre avaliamos nossos conteúdos. Seu feedback nos ajuda a melhorá-los.
Forneça um e-mail para que possamos responder
Obrigado pelo seu feedback!