Interface DeviceInforming
-
- All Implemented Interfaces:
public interface DeviceInforming
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumDeviceInforming.ConnectionStatusRepresents the possible network connection status for the Adobe SDK.
public enumDeviceInforming.DeviceTypeRepresents the possible device types.
public interfaceDeviceInforming.NetworkConnectionActiveListenerpublic interfaceDeviceInforming.DisplayInformation
-
Method Summary
Modifier and Type Method Description abstract FilegetApplicationBaseDir()Returns the directory which can be used as a application data directory. abstract StringgetLocaleString()Returns active locale's value in string format. abstract StringgetDefaultUserAgent()Returns the default platform/device user agent value abstract FilegetApplicationCacheDir()Returns the application specific cache directory. abstract InputStreamgetAsset(String fileName)Open the requested asset returns an InputStream to read its contents. abstract StringgetPropertyFromManifest(String resourceKey)Returns the property value specific to the key from the manifest file. abstract StringgetApplicationName()Returns the application name. abstract StringgetApplicationPackageName()Returns the application package name. abstract StringgetApplicationVersion()Returns the application version. abstract StringgetApplicationVersionCode()Returns the application version code as a string. abstract LocalegetActiveLocale()Returns the currently selected / active locale value with respect to the application context. abstract LocalegetSystemLocale()Returns the currently selected / active locale value on the device settings as set by the user. abstract DeviceInforming.DisplayInformationgetDisplayInformation()Returns information about the display hardware, as returned by the underlying OS. abstract intgetCurrentOrientation()Returns the current screen orientation abstract StringgetOperatingSystemName()Returns the string representation of the operating system name. abstract StringgetCanonicalPlatformName()Returns the string representation of the canonical platform name. abstract StringgetOperatingSystemVersion()Returns the string representation of the operating system version. abstract StringgetDeviceBrand()Returns the device brand. abstract StringgetDeviceManufacturer()The device manufacturer's name. abstract StringgetDeviceName()Returns the device name. abstract StringgetDevice()Returns name of the industrial design for the device abstract DeviceInforming.DeviceTypegetDeviceType()Returns the device type. abstract StringgetDeviceBuildId()Returns a string that identifies a particular device OS build. abstract StringgetMobileCarrierName()Returns the device's mobile carrier name. abstract DeviceInforming.ConnectionStatusgetNetworkConnectionStatus()Indicates whether network connectivity exists and it is possible to establish connections and pass data. abstract booleanregisterOneTimeNetworkConnectionActiveListener(DeviceInforming.NetworkConnectionActiveListener listener)Invokes a callback when the network connection status changes. abstract StringgetRunMode()Returns a string that identifies the SDK running mode, e.g. abstract StringgetDeviceUniqueId()Get unique identifier for device. -
-
Method Detail
-
getApplicationBaseDir
abstract File getApplicationBaseDir()
Returns the directory which can be used as a application data directory.
- Returns:
A File representing the application data directory, or null if not available on the platform
-
getLocaleString
abstract String getLocaleString()
Returns active locale's value in string format. The default value is en-US
- Returns:
Locale as
String
-
getDefaultUserAgent
abstract String getDefaultUserAgent()
Returns the default platform/device user agent value
- Returns:
String containing the default user agent
-
getApplicationCacheDir
abstract File getApplicationCacheDir()
Returns the application specific cache directory. The application will be able to read and write to the directory, but there is no guarantee made as to the persistence of the data (it may be deleted by the system when storage is required).
- Returns:
A File representing the application cache directory, or null if not available on the platform.
-
getAsset
abstract InputStream getAsset(String fileName)
Open the requested asset returns an InputStream to read its contents.
- Parameters:
fileName- asset's name which is to be retrieved- Returns:
an InputStream to read file's content, or null if not available on the platform
-
getPropertyFromManifest
abstract String getPropertyFromManifest(String resourceKey)
Returns the property value specific to the key from the manifest file.
- Parameters:
resourceKey- resource key- Returns:
A String value of the requested property, or null if there is no value defined for the key
-
getApplicationName
abstract String getApplicationName()
Returns the application name.
- Returns:
A String representing Application name if available, null otherwise
-
getApplicationPackageName
abstract String getApplicationPackageName()
Returns the application package name.
- Returns:
A String representing Application package name if available, null otherwise
-
getApplicationVersion
abstract String getApplicationVersion()
Returns the application version.
- Returns:
A String representing Application version if available, null otherwise
-
getApplicationVersionCode
abstract String getApplicationVersionCode()
Returns the application version code as a string.
- Returns:
application version code formatted as String using the active locale, if available. null otherwise
-
getActiveLocale
abstract Locale getActiveLocale()
Returns the currently selected / active locale value with respect to the application context.
- Returns:
A Locale value, if available, null otherwise
-
getSystemLocale
abstract Locale getSystemLocale()
Returns the currently selected / active locale value on the device settings as set by the user.
- Returns:
A Locale value, if available, null otherwise
-
getDisplayInformation
abstract DeviceInforming.DisplayInformation getDisplayInformation()
Returns information about the display hardware, as returned by the underlying OS.
- Returns:
DeviceInforming.DisplayInformation instance, or null if application context is null
-
getCurrentOrientation
abstract int getCurrentOrientation()
Returns the current screen orientation
- Returns:
a
intvalue indicates the orientation. 0 for unknown, 1 for portrait and 2 for landscape
-
getOperatingSystemName
abstract String getOperatingSystemName()
Returns the string representation of the operating system name.
- Returns:
Operating system name String.
-
getCanonicalPlatformName
abstract String getCanonicalPlatformName()
Returns the string representation of the canonical platform name.
- Returns:
Platform name String.
-
getOperatingSystemVersion
abstract String getOperatingSystemVersion()
Returns the string representation of the operating system version.
- Returns:
Operating system version String.
-
getDeviceBrand
abstract String getDeviceBrand()
Returns the device brand.
- Returns:
Stringcontaining the consumer-visible brand name
-
getDeviceManufacturer
abstract String getDeviceManufacturer()
The device manufacturer's name.
- Returns:
Device manufacturer name String if available. null otherwise
-
getDeviceName
abstract String getDeviceName()
Returns the device name.
- Returns:
String Device name if available, null otherwise
-
getDevice
abstract String getDevice()
Returns name of the industrial design for the device
- Returns:
Stringcontaining the name of the industrial design
-
getDeviceType
abstract DeviceInforming.DeviceType getDeviceType()
Returns the device type.
- Returns:
DeviceInforming.DeviceType representing the device type
-
getDeviceBuildId
abstract String getDeviceBuildId()
Returns a string that identifies a particular device OS build. This value may be present on Android devices, with a value like "M4-rc20". The value is platform dependent and platform specific.
- Returns:
String Build ID string if available. null otherwise
-
getMobileCarrierName
abstract String getMobileCarrierName()
Returns the device's mobile carrier name.
- Returns:
A String representing the carrier name. null if this value is not available
-
getNetworkConnectionStatus
abstract DeviceInforming.ConnectionStatus getNetworkConnectionStatus()
Indicates whether network connectivity exists and it is possible to establish connections and pass data.
Always call this before attempting to perform data transactions.
- If CONNECTED, if we have network connectivity.
- If DISCONNECTED, if do not have network connectivity.
- If UNKNOWN, if unable to determine the network connectivity.
- Returns:
DeviceInforming.ConnectionStatus representing the current network status
-
registerOneTimeNetworkConnectionActiveListener
abstract boolean registerOneTimeNetworkConnectionActiveListener(DeviceInforming.NetworkConnectionActiveListener listener)
Invokes a callback when the network connection status changes.
- Parameters:
listener- DeviceInforming.NetworkConnectionActiveListener listener that will get invoked once when the connection status changes.- Returns:
whether the registration was successful
-
getRunMode
abstract String getRunMode()
Returns a string that identifies the SDK running mode, e.g. Application, Extension.
- Returns:
String containing running mode
-
getDeviceUniqueId
abstract String getDeviceUniqueId()
Get unique identifier for device.
- Returns:
Stringcontaining the device UUID or null if applicationContextis null
-
-
-
-