This document features the method references for now.gg Utility Module for Native Android and Unity.
public class UtilitySDK { private static UtilitySDK instance; private UtilitySDK() { } }
The following are the public methods associated with UtilitySDK
class:
Method – Type | Usage | Description |
public static | UtilitySDK getInstance() |
Returns an instance of the UtilitySDK class. |
public boolean | isRunningOnNowGG(Context application) |
Returns true if the application is running on now.gg. |
public void | openUrl(String url, Activity activity) |
Opens the given URL in a new browser window. |
public DeviceType | getDeviceType(Context application) |
Return the device type on which the application is running. – Smartphone – Tablet – Desktop – Unknown (Shown if the device type is not detected). |
public enum DeviceType { SMARTPHONE, TABLET, DESKTOP, UNKNOWN }
This section illustrates the references related to now.gg Utility Module for Native Android.
The openUrl
method is used to open the specified URL in a new browser window of the user’s device.
Returns – void.
Params | Type | Summary |
---|---|---|
url | string | Opens the provided URL in a new browser window. |
The isRunningOnNowGG()
method is used to detect whether the app is running on now.gg platform or not.
Method | Type | Summary |
---|---|---|
isRunningOnNowGG | boolean | Returns whether the app is running on the now.gg Platform or not. |
The getDeviceType()
method is used to identify the user’s device type.
Params | Type | Summary |
---|---|---|
getDeviceType | DeviceType | Returns the user’s device type. – SMARTPHONE – TABLET – DESKTOP – UNKNOWN (Shown when the device type cannot be detected). |
This section illustrates the references related to now.gg Utility Module for Unity.
public class UtilitySDK { private static NowGGUtilitySdkManager instance; }
The following are the public methods associated with UtilitySDK
class:
Method – Type | Usage | Description |
public static | NowGGUtilitySdkManager Instance |
Returns an instance of the UtilitySDK class. |
public boolean | IsRunningOnNowGG() |
Returns true if the application is running on now.gg. |
public void | OpenUrl(string url) |
Opens the given URL in a new browser window. |
public DeviceType | GetDeviceType() |
Return the device type on which the application is running. – SMARTPHONE – TABLET – DESKTOP – UNKNOWN (Shown if the device type is not detected). |
public enum DeviceType { SMARTPHONE, TABLET, DESKTOP, UNKNOWN }
The OpenUrl
method is used to open the specified URL in a new browser window of the user’s device.
Returns – void.
Params | Type | Summary |
---|---|---|
url | string | Opens the provided URL in a new browser window. |
The IsRunningOnNowGG()
method is used to detect whether the app is running on now.gg platform or not.
Method | Type | Summary |
---|---|---|
IsRunningOnNowGG | boolean | Returns whether the app is running on the now.gg Platform or not. |
The GetDeviceType()
method is used to identify the user’s device type.
Params | Type | Summary |
---|---|---|
GetDeviceType | string | Returns the user’s device type. – SMARTPHONE – TABLET – DESKTOP – UNKNOWN (Shown when the device type cannot be detected). |
Utility Module
Utility Module
Document Rev. 1.0