Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HB-6185] Update Documentation for 4.4.0 #159

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bf2f8a4ebf2214f869e82e211b89fe04, type: 3}
m_Name: ChartboostMediationSettings
m_EditorClassIdentifier:
iOSAppId: 59c04299d989d60fc5d2c782
iOSAppSignature: 6deb8e06616569af9306393f2ce1c9f8eefb405c
androidAppId: 5a4e797538a5f00cf60738d6
androidAppSignature: d29d75ce6213c746ba986f464e2b4a510be40399
isLoggingEnabled: 1
iOSAppId: HE_IOS_APP_ID
iOSAppSignature: HE_IOS_APP_SIGNATURE
androidAppId: HE_ANDROID_APP_ID
androidAppSignature: HE_ANDROID_APP_SIGNATURE
isLoggingEnabled: 0
isAutomaticInitEnabled: 0
isSkAdNetworkResolutionEnabled: 1
isSkAdNetworkResolutionEnabled: 0
partnerKillSwitch: 0
disableBitCode: 0
applovinSDKKey: Fill to enable build-processing features.
androidGoogleAppId: Fill to enable build-processing features.
iOSGoogleAppId: Fill to enable build-processing features.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

This file was deleted.

13 changes: 7 additions & 6 deletions com.chartboost.mediation/Documentation/integration/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,18 @@ The user identifier property is found on the ChartboostMediation class. This pro
ChartboostMediation.SetUserIdentifier("user");
```

### Setting Custom Data
### Setting Fullscreen Placements Custom Data

The custom data property is found on the `ChartboostMediationRewardedAd` instance, and has a maximum character limit of `1000` characters. In the event that the limit is exceeded, the customData property will be set to null.
The custom data property is found on the `IChartboostMediationFullscreenAd` instance, and has a maximum character limit of `1000` characters. In the event that the limit is exceeded, the `customData` property will be set to null.

Custom data may be set at any time before calling `Show()`

```csharp
_rewardedAd = ChartboostMediation.GetRewardedAd(“placement”);
var loadResult = await ChartboostMediation.LoadFullscreenAd(loadRequest);
...
// after checking proper load result
_fullscreenAd = loadResult.Ad;
var bytesToEncode = Encoding.UTF8.GetBytes("{\"testkey\":\"testvalue\"}");
var encodedText = Convert.ToBase64String(bytesToEncode);
_rewardedAd.SetCustomData(encodedText);

_rewardedAd.Load();
_fullscreenAd.CustomData = encodedText;
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,57 +15,15 @@ There are 2 ways you can go about providing your App IDs to the SDK.

### Chartboost Mediation Settings & Automatic Initialization

Go to **Chartboost Mediation** > **Edit Settings**

Add your **Chartboost Mediation App ID** and **Chartboost Mediation App Signature**

Enable Automatic Initialization on the Chartboost Mediation Settings Scriptable object.

#### Chartboost Mediation Settings Static Accessors

ChartboostMediationSettings parameters can be modified via the available static accessors. As follows:

```c#
// IOS IDs Accessors
ChartboostMediation.IOSAppId = "SAMPLE_APP_ID_IOS";
ChartboostMediation.IOSAppSignature = "SAMPLE_APP_SIGNATURE_IOS";

// Android IDs Accessors
ChartboostMediation.AndroidAppId = "SAMPLE_APP_ID_ANDROID";
ChartboostMediation.AndroidAppSignature = "SAMPLE_APP_SIGNATURE_ANDROID";

// Logging Status Accessor
ChartboostMediation.IsLoggingEnabled = false;

// Automatic Initialization Accessor
ChartboostMediation.IsAutomaticInitializationEnabled = false;

// Partner Kill Switch Accessor
ChartboostMediation.PartnersKillSwitch = ChartboostMediationPartners.None;

// SKAdNetwork Resolution by Chartboost Mediation
ChartboostMediation.IsSkAdNetworkResolutionEnabled = false;
```

The Chartboost Mediation Unity SDK automatically uses such parameters to make decisions, the APIs are exposed for ease of usage.

### Default Chartboost Mediation Settings

![Chartboost Mediation Settings](../images/chartboost-mediation-settings.png)

> **Note** \
> Make sure that these are the AppId and App Signature values that you obtain directly from your Chartboost Mediation Dashboard for your app as opposed to credentials from Chartboost or any other Ad Network.
Visit [Chartboost Mediation Settings](../setup/settings.md) for more information on how to utilize the `ChartboostMediationSettings` `ScriptableObject` settings.

### Manual Initialization

If you would like to have more control on when to initialize the Chartboost Mediation SDK

You can call the following on your `Awake` method.
If you would like to have more control over when to initialize the Chartboost Mediation SDK, call the following on your Awake method.

```c#
// New Manual Initialization after 4.1.0
ChartboostMediation.StartWithAppIdAndAppSignature(ChartboostMediationSettings.AppId, ChartboostMediationSettings.AppSignature);

ChartboostMediation.StartWithOptions(ChartboostMediationSettings.AppId, ChartboostMediationSettings.AppSignature);

// Old Style of Manual Initialization Not Using ChartboostMediationSettings Scritable Object
var appId = "";
Expand All @@ -79,7 +37,7 @@ appId = "IOS_SAMPLE_APP_ID";
appSignature = "IOS_SAMPLE_APP_SIGNATURE";
#endif

ChartboostMediation.StartWithAppIdAndAppSignature(appID, appSignature);
ChartboostMediation.StartWithOptions(appID, appSignature);
```

This will start the Chartboost Mediation Unity SDK. For delegate information see section [Delegate Usage](delegate-usage.md)
Expand All @@ -90,22 +48,35 @@ This will start the Chartboost Mediation Unity SDK. For delegate information see
Once the Chartboost Mediation SDK has successfully started, you can start requesting ads.

### Partner Kill Switch

From Chartboost Mediation 3.3.0 forward, the Chartboost Mediation Unity SDK initialization method has been expanded to take in optional initialization parameters. One of those parameters is a set of partner adapter identifiers to skip initialization for the session.

In Unity, Chartboost Mediation partners are identified through the `ChartboostMediationPartners` enum. `ChartboostMediationPartners` implements enum flags, which means flags can be raised before initialization as needed.

By default, the Partner Kill Switch can be easily modified through the `ChartboostMediationSettings` scriptable object. By doing so, you can only enable/disable partner before builds are compiled. However, if your game utilizes a remote config supported service such as Leanplum, Swrve, etc. you can utilize remote config variables to enable/disable partners in deployed builds.

The following example disables AdMob, Facebook, and TapJoy before ChartboostMediation initialization. As long as the `ChartboostMediationSettings.PartnersKillSwitch` parameter is modified before initialization, the partner networks will be skipped during the initialization process.
The Chartboost Mediation Unity SDK initialization method has been expanded to take in optional initialization parameters. One of those parameters is a set of network adapter identifiers to skip initialization for the session.


```c#
ChartboostMediationSettings.PartnersKillSwitch = ChartboostMediationPartners.AdMob | ChartboostMediationPartners.MetaAdudienceNetwork | ChartboostMediationPartners.TapJoy;

var appID = "SAMPLE_APP_ID";
var appSignature = "SAMPLE_APP_SIGNATURE";

ChartboostMediation.StartWithAppIdAndAppSignature(appID, appSignature);
var options = new[]{"network_identifier", "network_identifier2"};
ChartboostMediation.StartWithOptions(ChartboostMediationSettings.AppId, ChartboostMediationSettings.AppSignature, options);
```

For more information on how to corroborate partner initialization data visit [Delegate Usage](delegate-usage.md)

#### Network Adapter Identifiers

| Network | Identifier |
|-----------------------------|-----------------------|
| AdColony | adcolony |
| AdMob | admob |
| Amazon Publisher Services | amazon_aps |
| AppLovin | applovin |
| Meta Audience Network | facebook |
| Digital Turbine Exchange | fyber |
| Google Bidding | google_googlebidding |
| InMobi | inmobi |
| IronSource | ironsource |
| Mintegral | mintegral |
| Pangle | pangle |
| Tapjoy | tapjoy |
| Unity | unity |
| Vungle | vungle |
| Yahoo | yahoo |
| MobileFuse | mobilefuse |
| Verve | verve |
| HyprMX | hyprmx |
7 changes: 1 addition & 6 deletions com.chartboost.mediation/Documentation/setup/ad-adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ The Chartboost Mediation Unity SDK does not embed Google’s EDM plugin.

If you want to integrate ad networks with other supported SDKs as well, you will need [Google's External Dependency Manager](https://developers.google.com/unity/archive#external_dependency_manager_for_unity). For more information see our recommended setup in [Google External Dependency Manager (EDM)](edm.md).

The Chartboost Mediation Unity SDK package contains samples with optional dependencies for ad adapters. Such samples can be found in the `Package Manager/Sample` sections.

Each Chartboost Mediation Unity SDK sample contains a .xml file with dependencies for the adapter available platforms (Android/iOS). In order for such dependencies to be included into the final build the [Google's External Dependency Manager](/~https://github.com/googlesamples/unity-jar-resolver) is needed.
The `EDM` makes sure to download and package any dependencies with your build.

## Chartboost Mediation Adapters Window

Since Chartboost Mediation 4.X Adapters are no longer released at the cadence as the Chartboost Mediation SDK, it is now possible to receive adapter updates in between SDK releases.
Expand All @@ -19,7 +14,7 @@ Until Chartboost Mediation Unity SDK 4.1.0, adapters were added through the UPM

### ***Adapters Window Default State***

The Adapters window can be accessed through the following unity menu: ***Chartboost Mediation/Adapters***
The Adapters window can be accessed through the following unity menu: ***Chartboost Mediation/Configure***

![Chartboost Mediation Settings](../images/adapters-window-default.png)

Expand Down

This file was deleted.

This file was deleted.

Loading