Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

The Device Info API is used to return various device parameters, such as the device Operating System name and number, or the version number of the Appoxee SDK installed on this device.

You can also use the API to set device parameters, for example: increase the number of products purchased through this device.

Each Method is called through "Appoxee.methodName", since they are all public static methods.

Device Info API Methods


getDeviceOsName

Returns the name of the Operating System installed on the device.

Syntax

public static String getDeviceOsName()

Returns

A string containing the name of the device Operating System.

getDeviceOsNumber

Returns the version number of the Operating System installed on the device.

Syntax

public static String getDeviceOsNumber()

Returns

A string containing the version number of the device Operating System.

getHardwareType

Returns the type of hardware installed on the device.

Syntax

public static String getHardwareType()

Returns

A string containing the type of the device hardware.

getDeviceLocale

Returns the device locale.

Syntax

public static String getDeviceLocale()

Returns

A string containing the device locale.

getDeviceCountry

Returns the device location, in any of the following formats:

  • Country, State, City 
  • Country, State
  • Country

Syntax

public static String getDeviceCountry()

Returns

A string containing the device location.

getDevicePlatform

Returns the device platform.

Syntax

public static String getDevicePlatform()

Returns

A string containing the device platform.

getDeviceSdkVersion

Returns the version number of the Appoxee SDK installed on the device.

Syntax

public static String getDeviceSdkVersion()

Returns

A string containing the version number of the Appoxee SDK installed on the device.

getDeviceResolution

Returns the device resolution.

Syntax

public static String getDeviceResolution()

Returns

A string containing the device resolution.

getDeviceDensity

Returns the device density.

Syntax

public static String getDeviceDensity()

Returns

A string containing the device density.

getInAppPayment

Returns the payments made through the device.

Syntax

public static Double getInAppPayment()

Returns

A decimal number indicating the payments made through the device.

getNumProductPurchased

Returns the number of products purchased through your app on this device.

Syntax

public static  Integer getNumProductPurchased()

Returns

An integer indicating the number of products purchased.

increaseInAppPayment

Increases the app payment by adding the given float value.

Syntax

public static boolean increaseInAppPayment(float value)

Parameters

float value - the value by which the app payment is to be increased.

Returns

true if the app payment was increased successfully; false otherwise.

increaseNumProductPurchased

Increases the number of products purchased through your app on this device, by adding the given integer value.

Syntax

public static boolean increaseNumProductPurchased(int value) 

Parameters

int value - the number by which the number of products purchased is to be increased.

Returns

true if the number of products purchased was increased successfully; false otherwise.

 

  • No labels