You.i Engine
CYIDeviceInformationBridge Class Referenceabstract

Detailed Description

Provides information about the device running the application.

This bridge is available on all platforms, however, some platforms such as Xbox One or PlayStation 4 may return limited information when compared to other bridge implementations. Some information may also only be available in debug mode.

#include <platform/YiDeviceInformationBridge.h>

Public Member Functions

virtual ~CYIDeviceInformationBridge ()
 
virtual CYIString GetDeviceModel ()=0
 
virtual CYIString GetDeviceUID ()=0
 
virtual CYIString GetDeviceOSName ()=0
 
virtual CYIString GetOSVersion ()=0
 
virtual bool HasHardwareBackButton ()=0
 
virtual void GetAdvertisingId (std::function< void(const CYIString &)> advertisingIdCallback)=0
 

Constructor & Destructor Documentation

virtual CYIDeviceInformationBridge::~CYIDeviceInformationBridge ( )
inlinevirtual

Member Function Documentation

virtual void CYIDeviceInformationBridge::GetAdvertisingId ( std::function< void(const CYIString &)>  advertisingIdCallback)
pure virtual

Returns the advertising identifier by calling the given callback. The advertising identifier is not available on all platforms. An empty string is returned if it isn't available or if the user has opted to limit advertising.

Note
The callback will be called on the main thread and may be called synchronously (even immediately at the call site) or asynchronously depending on whether an advertising identifier is available immediately or not on a given platform.
virtual CYIString CYIDeviceInformationBridge::GetDeviceModel ( )
pure virtual

Gets information about the model of the device. The information returned is platform specific.

virtual CYIString CYIDeviceInformationBridge::GetDeviceOSName ( )
pure virtual

Gets the name of the operating system running on the device ("Android" for example).

virtual CYIString CYIDeviceInformationBridge::GetDeviceUID ( )
pure virtual

Gets a unique identifier for the device (such as a MAC address or UUID). The returned format is platform specific. The given UID is not guaranteed to be usable for DRM on all platforms.

Note
The “READ_PHONE_STATE” permission is required for the android platform.
virtual CYIString CYIDeviceInformationBridge::GetOSVersion ( )
pure virtual

Gets the operating system version ("1.0.1" for example). Not all platforms will return a parsable string.

virtual bool CYIDeviceInformationBridge::HasHardwareBackButton ( )
pure virtual

Returns true if the current device has a hardware back button available.


The documentation for this class was generated from the following file: