This section contains additional guides associated with now.gg Cloud to help you configure our services and APIs conveniently.
The following guides are available:
This section focuses on setting up the now.gg Cloud storage to save and restore the user’s game progress data by defining the save file path(s) and excluded file path(s).
Defining the ‘Save’ and ‘Excluded’ file path(s) is an essential practice that reduces the game’s loading time to enhance the user experience and ensure optimal usage of now.gg Cloud storage.
To set up the cloud storage, you should specify the following:
/data/data/<package_name>/<file_name>
.You can configure this setting for any new app you release now.gg Cloud. In case your app is already released, you will need to release a new version of your app.
To configure the file paths:
Note:
Android id
, within the app, for a better experience.Using this guide, you can prepare your app files to upload on nowStudio.
To create a release with nowStudio, you need to prepare your app files. We accept either a standalone APK or an APK and Assets Zip file.
You can prepare either of the following:
This section provides instructions to prepare an APK file to upload on nowStudio.
Prepare an APK file that adheres to the following requirements:
After you have prepared your APK, you can continue to add your app on nowStudio.
Games typically download necessary assets at launch, causing delays in gameplay. With now.gg, you can provide a Zip containing the APK and Assets to significantly reduce the game loading time and enable instant gameplay for the user.
You should follow the specified format and contents below to create the zip archive of your App and Assets:
The following sample JSON illustrates the required format for the manifest file metadata.json:
{ "assets": [ { "name": "asset1.xyz", "location": "/data/media/0/Android/data/<packageName>/files" }, { "name": "asset2.unity3d", "location": "/data/media/0/Android/data/<packageName>/files" }, { "name": "OtherAssets", "location": "/data/data/<packageName>/files" } ] }
After you have prepared the APK and Assets Zip archive, you can continue to add your app on nowStudio.
This guide details the process of adding a custom domain for your apps if you want to host them on domains other than now.gg.
In addition to now.gg Cloud, you can also host your apps on other domains by adding a custom domain for your apps on nowStudio.
The following scenarios are explained:
This section explains the steps to add a custom domain for a new app.
To do so:
This section explains the steps to add a custom domain for an already published app.
To do so:
nowgg CLI is a command-line tool that lets you easily upload your app builds to nowStudio. This guide details this functionality.
Open any terminal on macOS or Windows.
pip install nowgg
nowgg init --token "<your_publisherToken_from_nowStudio>"
nowgg upload --app_id <your_app_id> --file_path "/directory/sample.apk" --apk_version <app_version_name> --version_code <app_version_code>
Note: Your app will be uploaded to the App Library within nowStudio.
nowgg upload --app_id <your_app_id> --file_path "/directory/sample.apk" --apk_version <apk_version> --version_code <app_version_code> --deploy
app_id
that you can use to create a draft release on that test track.
app_id
for test track 1 would be 1234_t1
.--deploy
triggers the deployment process on the test track identified using app_id
.nowgg -h nowgg init -h nowgg upload -h
<python directory>\<Scripts>
to your PATH.The following document focuses on important aspects of the subscription capability offered by nowStudio.
Subscriptions are in-app products on now.gg that charge users a recurring fee for access to content or services within your app.
nowStudio offers a versatile ‘Subscriptions’ capability that enables you to create, manage, and sell subscriptions effortlessly. The primary distinction between an in-app product and a subscription product is that an in-app product incurs a one-time charge for the user, whereas subscriptions involve recurring charges.
To understand how to create and manage subscriptions in nowStudio:
To understand how to implement subscriptions in your app using now.gg Payments module, follow these guides:
Important: In addition to the information on this page, you should also refer to now.gg policy.
This section introduces subscriptions.
A subscription offers a set of benefits that users can access for a specified time period. You can have multiple subscriptions within the same app to represent different benefit sets or tiers of a single benefit set, such as ‘Gold’ and ‘Diamond’ packs. Users gain access to a subscription by purchasing it through your app on now.gg.
now.gg enables you to select the duration of the subscription. The available billing periods are:
now.gg subscriptions are auto-renewing. Users can purchase a subscription for a specified billing period, with automatic renewals at the end of each period, ensuring an uninterrupted subscription experience until cancelled. Subscriptions can be cancelled by the user, developer, or now.gg.
You can add up to four benefits to your subscription, helping users understand what they will receive. You should highlight the core benefits relevant to your subscription.
If a renewal payment is declined, now.gg will prompt the user to resolve the payment issue. If unresolved, the subscription will automatically expire.
now.gg Embed Javascript Module provides a framework that enables you to seamlessly embed cloud gameplay on your website.
With now.gg Embed Module, you can:
The following prerequisites must be met before integrating with now.gg Embed Module:
clientId
, please contact us at dev-support@now.gg.Once the prerequisites are met, you can continue to the next section to embed gameplay on your webpage.
To enable cloud gameplay on your website using now.gg Embed Module:
The first step is to add the Embed Module to your website.
To add the now.gg Embed Module to your website, add the Module resource javascript in a script tag, as illustrated below:
<script type="text/javascript" src="https://cdn.now.gg/external/sdk/ifp-sdk-1.1.0.min.js"></script>
After the now.gg Embed Module resource has been added, you can initialize the Module to embed gameplay on your website using now.gg Embedding.
To do this:
iframeParentElement
, the appEventCallbackFunction
, and the sdkEventCallbackFunction
.init
function of the NowIfp
class along with the required parameters to start the cloud game, as illustrated below:const iframeParentElement = document.getElementById("your_iframe_element"); // Callback function to handle events sent from the Android app. const appEventCallbackFunction = (event) => { console.log(event.name); console.log(event.data); // can do your event-based handling here }; // Callback function to handle javascript Module events. const sdkEventCallbackFunction = (event) => { console.log(event.name); console.log(event.msg); // can do your event-based handling here }; NowIfp.init({ clientId: <"your_clientId"> , appId: <"your_production_appId/your_test_track_appId"> , \\ appId example - Test Track: "1234_t1" | Production: "1234" iframeParentElement: iframeParentElement, customData: {} // for app-specific custom handling appLaunchData: { // pass launch arguments to Iframe, It will be serialized and passed to the app at launch intent. [key]: [value] } appEventCallback: appEventCallbackFunction, sdkEventCallback: sdkEventCallbackFunction, isNowLoginEnabled: true });
Using this section, you can locate your appId
within nowStudio.
appId
is a unique identifier for your app on nowStudio.appId
for your app on testing and production environments.
appId
will be visible only after the app is deployed.appId
is also available under the App Details section after you add your app.appId
is listed on the live test release, as shown below:appId
is listed on the live production release, as shown below:Params | Type | Required | Summary |
---|---|---|---|
clientId | string | Yes | Unique client identifier. |
appId | string | Yes | App ID associated with your app/game on nowStudio. nowStudio generates different appId for production and testing environments. Example – Production appId: “1234″. Test Track appId: “1234_t1″. |
iframeParentElement | element | Yes | The iframeParentElement in which the embedded player will be rendered. |
customData | object | No | Any app-specific data that you wish to pass to now.gg backend. |
appLaunchData | object | No | Extra data that is sent as app launch intent extras. – Refer – Define appLaunchData section. |
appEventCallback | function | No | App Event callback function for App-related events handling. Refer – Start Game in Iframe section. |
sdkEventCallback | function | No | Module Event callback function for Module-related events handling. Refer – Start Game in Iframe section. |
isNowLoginEnabled | boolean | No | true – now.gg Login will be triggered at the app launch. false – now.gg Login will not be triggered. |
Your game is now embedded on your web page, powered by the now.gg Cloud. For Advanced embedding, refer to the next section.
This section explains the steps to implement advanced functionality with the embedded game on your website (HTML page).
To further enhance the gameplay experience of your embedded game, now.gg Embed Module enables you to:
After you have integrated with now.gg Events module, you can pass events and data from your App on now.gg Cloud to your HTML page where the game is embedded.
Please refer to:
You can now pass app launch parameters to your App from your HTML page. We have provided sample code snippets to define appLaunchData
that is passed to NowIfp.init
and to retrieve it in your App.
The appLaunchData
is passed as a parameter to the NowIfp.init()
, which passes it to the App as a launch intent parameter. The following code illustrates how to pass appLaunchData
to NowIfp.init()
.
NowIfp.init({ clientId: <"your_clientId"> , appId: <"your_appId"> , iframeParentElement: iframeParentElement, customData: {} // for app-specific custom handling appLaunchData: { [key]: [value] } // pass launch arguments to Iframe as it's at launch, It will be serialized and passed to the app at launch intent. appEventCallback: appEventCallbackFunction, sdkEventCallback: sdkEventCallbackFunction, isNowLoginEnabled: true });
With this step, your App can retrieve the appLaunchData
, which was sent from your HTML page to your App.
The following code snippet showcases how to retrieve the value using key from your App, as illustrated below:
//Retrieves the value using key passed as app launch parameter string value = NowGGEventsSdkManager.Instance.GetAppLaunchDataProperty(key);
Please refer to:
appLaunchData
is only passed at App launch and cannot be passed when the App is running.This section showcases a demo HTML page for the now.gg Embed Module, and explains the end-to-end flow associated with the Embed Module.
Please go through the Embed Module demo by following the steps below:
appLaunchData
with launch intent:sdkEventCallback
, as shown below.appEventCallback
function, as shown below:Table of Contents
Table of Contents
Document Rev. 1.0