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 StringadvertisingIDpublic BooleanlmtEnabledpublic StringcarrierNamepublic StringacceptLanguagepublic Stringmakepublic Stringmodelpublic 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()StringgetAdvertisingID()BooleangetLmtEnabled()StringgetCarrierName()StringgetAcceptLanguage()StringgetMake()StringgetModel()StringgetOsName()StringgetOsVersion()StringgetScreenResolution()StringgetCurrentTimeZone()floatgetPxratio()StringgetMccmnc()voidupdateAdvertisingIdInfo()Method is used to update advertising Id from AdvertisingIdClient class POBDeviceInfo.DEVICE_ID_TYPEgetAndroidIdType(boolean aidEnabled)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 intgetOrientation()intgetScreenWidth()intgetScreenHeight()-
-
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()
-
getAdvertisingID
@Nullable() String getAdvertisingID()
-
getLmtEnabled
@Nullable() Boolean getLmtEnabled()
-
getCarrierName
@Nullable() String getCarrierName()
-
getAcceptLanguage
@Nullable() String getAcceptLanguage()
-
getOsVersion
@Nullable() String getOsVersion()
-
getScreenResolution
@Nullable() String getScreenResolution()
-
getCurrentTimeZone
@Nullable() String getCurrentTimeZone()
-
getPxratio
float getPxratio()
-
updateAdvertisingIdInfo
void updateAdvertisingIdInfo()
Method is used to update advertising Id from AdvertisingIdClient class
-
getAndroidIdType
POBDeviceInfo.DEVICE_ID_TYPE getAndroidIdType(boolean aidEnabled)
-
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
-
getOrientation
int getOrientation()
-
getScreenWidth
int getScreenWidth()
-
getScreenHeight
int getScreenHeight()
-
-
-
-