Compilation d’applications

Learn about advanced setups from our how-tos.

Comment intégrer des SDK dans des projets d'applications Android

Recommandations

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 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>
Note
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.
Cet article vous a été utile ?
Merci !
Que pouvons-nous améliorer ? Message
Nous sommes désolés de l'apprendre
Dites-nous pourquoi vous n'avez pas trouvé cet article utile. Message
Merci pour votre commentaire !
Nous examinerons votre message et l'utiliserons pour améliorer votre expérience.
Masquer

Comment créer un build d'application exécutable dans un navigateur

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.

Build WebGL de démo
Regarder la démo dans un navigateur.

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.

Note
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.

Poursuivre la lecture

Cet article vous a été utile ?
Merci !
Que pouvons-nous améliorer ? Message
Nous sommes désolés de l'apprendre
Dites-nous pourquoi vous n'avez pas trouvé cet article utile. Message
Merci pour votre commentaire !
Nous examinerons votre message et l'utiliserons pour améliorer votre expérience.
Masquer
Dernière mise à jour: 10 Octobre 2023

Faute de frappe ou autre erreur dans le texte ? Sélectionnez le texte concerné et appuyez sur Ctrl+Entée.

Signaler un problème
Nous améliorons continuellement notre contenu grâce à vos commentaires.
Indiquez votre adresse e-mail pour un suivi
Merci pour votre commentaire !