Setting up the webpage for app service

App users go through the following steps to install and run the app:

 

  1. Click the app launch button on the webpage where the app is being serviced, and download and install the Crossplay Launcher.
  2. Run the Crossplay Launcher.
  3. The Crossplay Launcher automatically downloads and installs the app.
  4. The Crossplay Launcher automatically updates and runs the app.

 

The following is the entire process of servicing the app from the webpage using the Crossplay Launcher.

 

 

The webpage for servicing app can be provided in the following two ways:

  1. Hive Games (https://withhive.com/)
  2. a webpage built by the company who developed the app.

This guide provides examples and guidance on what needs to be implemented on the webpage when using the Crossplay Launcher to service the app from a webpage built by the app developer.

Checking app service conditions

When a user accesses the webpage, check if the user’s PC environment, such as the OS version, is supported.

  • Supported OS: Windows 10 or above

After checking the conditions, if there are any issues, an error popup should be displayed to the user.

Implementing app launch button and Crossplay Launcher download popup

Implement the app launch button on the webpage.

 

Implement a popup window for downloading the Crossplay Launcher installation file. The popup window must include guides for installing the Crossplay Launcher.

 

Implement clicking the app launch button on the webpage displays the popup window. The popup window should have a button to download the Crossplay Launcher installation file.

Checking for Crossplay Launcher installation

When a user clicks the app launch button on the webpage, it’s necessary to check if the Crossplay Launcher is installed on the user’s PC. Execute the following JavaScript code on the webpage to check if the Crossplay Launcher is installed on the user’s PC.

JavaScript Code

If the Crossplay Launcher is not installed on the user’s PC, implement the feature to install both the Crossplay Launcher and the app together. If the Crossplay Launcher was already installed, implement the feature to run the Crossplay Launcher.

Install both Crossplay Launcher and app together

During the installation process of the Crossplay Launcher, the app can also be automatically installed and run.

Implement event for downloading Crossplay Launcher installation file: download the installation file

After implementing the guides above to create the app launch button and popup, implement the feature for users to download the Crossplay Launcher installation file, hivecrossplay-fn.qpyou.cn/hivecrossplay/p/w/Installer.exe, when they click the download button on the popup.

Implement event for downloading Crossplay Launcher installation file: automatic app installation

When users click the download button, implement the feature to copy the Auto Installation URI to the user’s PC clipboard. After installing the Crossplay Launcher, the Crossplay Launcher automatically searches the clipboard for the game installation URI. If found, it installs the app corresponding to the URI. If the game installation URI is not found in the clipboard, only the Crossplay Launcher is installed on the user’s PC. To install the app, the user needs to return to the webpage and click the app launch button again. Refer to Run the Crossplay Launcher for more details.

Obtaining the auto installation URI

Obtain the automatic installation URI from Hive console (Sandbox or Commercial) > Crossplay Launcher > App Management > Download Setting > Launcher Installation/Launch URI.

Copying the URI to clipboard

Implement copying the obtained automatic installation URI to the user’s PC clipboard space.

Run the Crossplay Launcher

Once the Crossplay Launcher is installed on the user’s PC, execute the following JavaScript code when an event that the user clicks the app launch button on the webpage occurs. The JavaScript code launches the Crossplay Launcher with the launch URI, and the Crossplay Launcher automatically installs and runs the app.

Obtain the launch uri

Obtain the launch URI from Hive console (Sandbox or Live) > Crossplay Launcher > App Management > Download Setting > Launcher Installation/Launch URI.

Implement and run Javascript code

When the Crossplay Launcher is installed on the user’s PC, implement the execution of JavaScript code when the user clicks the app launch button on the webpage.

 

Below is an example of the result when the “Play on PC” button is pressed, triggering JavaScript code execution. As the Crossplay Launcher in run, a browser notification prompts whether to execute the Crossplay Updater, which updates the Crossplay Launcher itself.