use of org.prebid.mobile.rendering.networking.parameters.DeviceInfoParameterBuilder in project prebid-mobile-android by prebid.
the class Requester method getParameterBuilders.
protected List<ParameterBuilder> getParameterBuilders() {
Context context = mContextReference.get();
Resources resources = null;
if (context != null) {
resources = context.getResources();
}
boolean browserActivityAvailable = ExternalViewerUtils.isBrowserActivityCallable(context);
ArrayList<ParameterBuilder> parameterBuilderArray = new ArrayList<>();
parameterBuilderArray.add(new BasicParameterBuilder(mAdConfiguration, resources, browserActivityAvailable));
parameterBuilderArray.add(new GeoLocationParameterBuilder());
parameterBuilderArray.add(new AppInfoParameterBuilder(mAdConfiguration));
parameterBuilderArray.add(new DeviceInfoParameterBuilder(mAdConfiguration));
parameterBuilderArray.add(new NetworkParameterBuilder());
parameterBuilderArray.add(new UserConsentParameterBuilder(mUserConsentManager));
return parameterBuilderArray;
}
use of org.prebid.mobile.rendering.networking.parameters.DeviceInfoParameterBuilder in project prebid-mobile-android by prebid.
the class AutoDetectedOpenRtbTest method overwrittenDeviceInfoParameterBuilder.
@Test
public void overwrittenDeviceInfoParameterBuilder() {
mOriginalOpenRtbParams.getDevice().dpidmd5 = "foo";
mOriginalOpenRtbParams.getDevice().dpidsha1 = "foo";
mOriginalOpenRtbParams.getDevice().w = 0;
mOriginalOpenRtbParams.getDevice().h = 0;
mParamBuilderArray.add(new DeviceInfoParameterBuilder(new AdConfiguration()));
AdRequestInput newAdRequestInput = URLBuilder.buildParameters(mParamBuilderArray, mOriginalAdRequestInput);
BidRequest newOpenRtbParams = newAdRequestInput.getBidRequest();
assertNotEquals(mOriginalOpenRtbParams.getDevice().dpidmd5, newOpenRtbParams.getDevice().dpidmd5);
assertNotEquals(mOriginalOpenRtbParams.getDevice().dpidsha1, newOpenRtbParams.getDevice().dpidsha1);
assertNotEquals(mOriginalOpenRtbParams.getDevice().w, newOpenRtbParams.getDevice().w);
assertNotEquals(mOriginalOpenRtbParams.getDevice().h, newOpenRtbParams.getDevice().h);
}
Aggregations