use of org.prebid.mobile.rendering.networking.parameters.GeoLocationParameterBuilder in project prebid-mobile-android by prebid.
the class AutoDetectedOpenRtbTest method overwrittenGeoLocationParameterBuilderTest.
@Test
public void overwrittenGeoLocationParameterBuilderTest() {
mOriginalOpenRtbParams.getDevice().getGeo().lat = 0f;
mOriginalOpenRtbParams.getDevice().getGeo().lon = 0f;
mOriginalOpenRtbParams.getDevice().getGeo().type = 0;
mOriginalAdRequestInput.setBidRequest(mOriginalOpenRtbParams);
mParamBuilderArray.add(new GeoLocationParameterBuilder());
AdRequestInput newAdRequestInput = URLBuilder.buildParameters(mParamBuilderArray, mOriginalAdRequestInput);
BidRequest newOpenRtbParams = newAdRequestInput.getBidRequest();
assertNotEquals(mOriginalOpenRtbParams.getDevice().getGeo().lat, newOpenRtbParams.getDevice().getGeo().lat);
assertNotEquals(mOriginalOpenRtbParams.getDevice().getGeo().lon, newOpenRtbParams.getDevice().getGeo().lon);
assertNotEquals(mOriginalOpenRtbParams.getDevice().getGeo().type, newOpenRtbParams.getDevice().getGeo().type);
}
use of org.prebid.mobile.rendering.networking.parameters.GeoLocationParameterBuilder 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;
}
Aggregations