use of org.prebid.mobile.rendering.networking.parameters.AppInfoParameterBuilder 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.AppInfoParameterBuilder in project prebid-mobile-android by prebid.
the class AutoDetectedOpenRtbTest method overwrittenAppInfoParameterBuilder.
@Test
public void overwrittenAppInfoParameterBuilder() {
mOriginalOpenRtbParams.getApp().name = "foo";
mOriginalOpenRtbParams.getApp().bundle = "foo";
mOriginalOpenRtbParams.getDevice().ifa = "foo";
mOriginalOpenRtbParams.getDevice().lmt = 0;
AppInfoManager.setAppName("bar");
AppInfoManager.setPackageName("bar");
AdIdManager.setAdId("bar");
AdIdManager.setLimitAdTrackingEnabled(true);
mParamBuilderArray.add(new AppInfoParameterBuilder(new AdConfiguration()));
AdRequestInput newAdRequestInput = URLBuilder.buildParameters(mParamBuilderArray, mOriginalAdRequestInput);
BidRequest newOpenRtbParams = newAdRequestInput.getBidRequest();
assertNotEquals(mOriginalOpenRtbParams.getApp().name, newOpenRtbParams.getApp().name);
assertNotEquals(mOriginalOpenRtbParams.getApp().bundle, newOpenRtbParams.getApp().bundle);
assertNotEquals(mOriginalOpenRtbParams.getDevice().ifa, newOpenRtbParams.getDevice().ifa);
assertNotEquals(mOriginalOpenRtbParams.getDevice().lmt, newOpenRtbParams.getDevice().lmt);
}
Aggregations