Skip to content

Commit

Permalink
Documentation for AppLovin Mediation Extras
Browse files Browse the repository at this point in the history
  • Loading branch information
LTPhantom committed May 7, 2024
1 parent 65d99b0 commit aaf6d5b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import 'package:google_mobile_ads/google_mobile_ads.dart';

/// Extra information sent to the AppLovin adapter through an [AdRequest] or an [AdManagerAdRequest].
class AppLovinMediationExtras implements MediationExtras {
/// Default constructor with required extras value.
const AppLovinMediationExtras({required this.isMuted});

/// Specifies whether the loaded AppLovin ad will be muted or not.
final bool isMuted;

@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Autogenerated from Pigeon (v17.0.0), do not edit directly.
// Autogenerated from Pigeon (v17.1.2), do not edit directly.
// See also: https://pub.dev/packages/pigeon
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers

Expand All @@ -15,6 +15,7 @@ PlatformException _createConnectionError(String channelName) {
);
}

/// The generated classes set the channels to call the methods in the corresponding kotlin AppLovinSDKApi interface and swift AppLovinSDKApi protocol from the dart layer.
class AppLovinSDKApi {
/// Constructor for [AppLovinSDKApi]. The [binaryMessenger] named argument is
/// available for dependency injection. If it is left null, the default
Expand All @@ -26,6 +27,7 @@ class AppLovinSDKApi {
static const MessageCodec<Object?> pigeonChannelCodec =
StandardMessageCodec();

/// Used to configure GDPR consent on the Android or iOS AppLovin SDK
Future<void> setHasUserConsent(bool hasUserConsent) async {
const String __pigeon_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setHasUserConsent';
Expand All @@ -50,6 +52,7 @@ class AppLovinSDKApi {
}
}

/// Used to acknowledge that the user is in an age-restricted category on the Android or iOS AppLovin SDK
Future<void> setIsAgeRestrictedUser(bool isAgeRestrictedUser) async {
const String __pigeon_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setIsAgeRestrictedUser';
Expand All @@ -74,6 +77,7 @@ class AppLovinSDKApi {
}
}

/// Used to opt out of the sale of personal information in AppLovin SDK.
Future<void> setDoNotSell(bool doNotSell) async {
const String __pigeon_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.setDoNotSell';
Expand All @@ -98,6 +102,7 @@ class AppLovinSDKApi {
}
}

/// Used to initialize the Android or iOS AppLovin SDK. Can be called anytime before the adapter initialization to let AppLovin track events as soon as possible.
Future<void> initializeSdk(String sdkKey) async {
const String __pigeon_channelName =
'dev.flutter.pigeon.gma_mediation_applovin.AppLovinSDKApi.initializeSdk';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@

import 'package:gma_mediation_applovin/applovin_sdk_api.g.dart';

/// This class has entrypoint to call AppLovin's SDK APIs.
class GmaMediationApplovin {
static Future<void> setHasUserConsent(bool hasUserConsent) async {
Future<void> setHasUserConsent(bool hasUserConsent) async {
AppLovinSDKApi().setHasUserConsent(hasUserConsent);
}

static Future<void> setIsAgeRestrictedUser(bool isAgeRestrictedUser) async {
Future<void> setIsAgeRestrictedUser(bool isAgeRestrictedUser) async {
AppLovinSDKApi().setIsAgeRestrictedUser(isAgeRestrictedUser);
}

static Future<void> setDoNotSell(bool doNotSell) async {
Future<void> setDoNotSell(bool doNotSell) async {
AppLovinSDKApi().setDoNotSell(doNotSell);
}

static Future<void> initializeSdk(String sdkKey) async {
Future<void> initializeSdk(String sdkKey) async {
AppLovinSDKApi().initializeSdk(sdkKey);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import 'package:pigeon/pigeon.dart';
dartPackageName: 'gma_mediation_applovin',
))
@HostApi()

/// The generated classes set the channels to call the methods in the corresponding kotlin AppLovinSDKApi interface and swift AppLovinSDKApi protocol from the dart layer.
abstract class AppLovinSDKApi {
/// Used to configure GDPR consent on the Android or iOS AppLovin SDK
Expand Down

0 comments on commit aaf6d5b

Please sign in to comment.