Class POBDeviceInfo
-
- All Implemented Interfaces:
public class POBDeviceInfoA class representing the Device details, derived internally using framework APIs
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumPOBDeviceInfo.DEVICE_ID_TYPEEnum to denote the device type.
-
Field Summary
Fields Modifier and Type Field Description public intscreenWidthpublic intscreenHeightpublic inttimeZoneOffsetInMinutespublic StringandroidIdpublic StringcarrierNamepublic StringacceptLanguagepublic Stringmakepublic Stringmodelpublic StringhardwareVersionpublic StringosNamepublic StringosVersionpublic StringscreenResolutionpublic StringcurrentTimeZonepublic floatpxratiopublic Stringmccmnc
-
Constructor Summary
Constructors Constructor Description POBDeviceInfo(Context context)Constructor.
-
Method Summary
Modifier and Type Method Description intgetTimeZoneOffsetInMinutes()Return local time as the number +/- of minutes from UTC. StringgetAndroidId()StringgetCarrierName()StringgetAcceptLanguage()StringgetMake()StringgetModel()StringgetHardwareVersion()StringgetOsName()StringgetOsVersion()StringgetScreenResolution()StringgetCurrentTimeZone()floatgetPxratio()StringgetMccmnc()voidrefreshAdvertisingIdInfo()Method is used to update advertising Id from AdvertisingIdClient class POBDeviceInfo.DEVICE_ID_TYPEgetAndroidIdType(boolean aidEnabled)StringgetAdvertisingID()StringgetISOAlpha2CountryCode()Returns the ISO-3166-1 alpha-2 country code if available StringgetISOAlpha3CountryCode()Returns the ISO-3166-1 alpha-3 country code if available. StringgetUserAgent()This method fetch the user agent from WebSettings and save it for future reference. StringgetCurrentTime()Method is used to get current datetime in formated String yyyy-MM-dd HH:mm:ss BooleangetLmtEnabled()intgetOrientation()intgetScreenWidth()intgetScreenHeight()StringgetDeviceIp()voidregisterIpUpdateService(@NonNull() POBDeviceIpUpdaterService deviceIpUpdaterService)Registers a network callback that persists throughout the application lifecycle to receive network state updates, ensuring profile configuration requests are triggered and the latest IP addresses are always available as deviceIp. -
-
Constructor Detail
-
POBDeviceInfo
POBDeviceInfo(Context context)
Constructor.- Parameters:
context- context
-
-
Method Detail
-
getTimeZoneOffsetInMinutes
int getTimeZoneOffsetInMinutes()
Return local time as the number +/- of minutes from UTC. To be sent as 'utcoffset' in oRTB. Example: +330 for IST i.e. UTC+5:30
- Returns:
Local time offset
-
getAndroidId
@Nullable() String getAndroidId()
-
getCarrierName
@Nullable() String getCarrierName()
-
getAcceptLanguage
@Nullable() String getAcceptLanguage()
-
getHardwareVersion
@Nullable() String getHardwareVersion()
-
getOsVersion
@Nullable() String getOsVersion()
-
getScreenResolution
@Nullable() String getScreenResolution()
-
getCurrentTimeZone
@Nullable() String getCurrentTimeZone()
-
getPxratio
float getPxratio()
-
refreshAdvertisingIdInfo
void refreshAdvertisingIdInfo()
Method is used to update advertising Id from AdvertisingIdClient class
-
getAndroidIdType
POBDeviceInfo.DEVICE_ID_TYPE getAndroidIdType(boolean aidEnabled)
-
getAdvertisingID
@Nullable() String getAdvertisingID()
-
getISOAlpha2CountryCode
@Nullable() String getISOAlpha2CountryCode()
Returns the ISO-3166-1 alpha-2 country code if available
- Returns:
The lowercase 2 character ISO-3166-1 alpha-2 country code, object if not available
-
getISOAlpha3CountryCode
@Nullable() String getISOAlpha3CountryCode()
Returns the ISO-3166-1 alpha-3 country code if available. Priority is from TelephonyManager followed by GPS system.
- Returns:
The lowercase 3 character ISO-3166-1 alpha-3 country code, object if not available
-
getUserAgent
@WorkerThread() String getUserAgent()
This method fetch the user agent from WebSettings and save it for future reference. And return the same. If not found then just return user-agent using System.getProperty("http.agent"). It will return empty string in case unable to fetch the user-agent at all.
- Returns:
user agent
-
getCurrentTime
String getCurrentTime()
Method is used to get current datetime in formated String yyyy-MM-dd HH:mm:ss
- Returns:
return date of type String
-
getLmtEnabled
@Nullable() Boolean getLmtEnabled()
-
getOrientation
int getOrientation()
-
getScreenWidth
int getScreenWidth()
-
getScreenHeight
int getScreenHeight()
-
getDeviceIp
@Nullable() String getDeviceIp()
-
registerIpUpdateService
void registerIpUpdateService(@NonNull() POBDeviceIpUpdaterService deviceIpUpdaterService)
Registers a network callback that persists throughout the application lifecycle to receive network state updates, ensuring profile configuration requests are triggered and the latest IP addresses are always available as deviceIp.
Note: This method should be called only once during the first initialize call.
- Parameters:
deviceIpUpdaterService- The POBDeviceIpUpdaterService instance responsible for registering callback mechanisms to obtain the most recent device IP address from profile configuration response headers.
-
-
-
-