Get more information about SDK integration and usage in our Wiki:
BidMachine Android SDK Documentation
Add this to Module-level or App-level build.gradle
before dependencies:
repositories {
// ... other project repositories
maven {
name 'BidMachine maven repo'
url 'https://artifactory.bidmachine.io/bidmachine'
}
}
Add next dependency to you build.gradle:
dependencies {
// ... other project dependencies
implementation 'io.bidmachine:ads:1.3.3'
}
Android 9.0 (API 28) blocks cleartext (non-HTTPS) traffic by default, which can prevent ads from serving correctly.
Add a Network Security Configuration file to your AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<application
...
android:networkSecurityConfig="@xml/network_security_config"
... >
</application>
</manifest>
In your network_security_config.xml
file, add base-config that sets cleartextTrafficPermitted to true:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
<certificates src="user" />
</trust-anchors>
</base-config>
</network-security-config>
Initialize SDK, and set your SellerId
:
BidMachine.initialize(Context, YOUR_SELLER_ID);
To get your SELLER_ID, visit our website or contact the support.
3rd party networks which can be used for Header-Bidding can be find here
Please view the changelog for details.