TBLSdkPlugin class
This class is the Dart part of a 2-way bridge to native Android & iOS code.
The mirroring part is:
-
In Android /taboola_sdk/android/src.main/java.com.taboola.flutter/TaboolaSdkPlugin.java -- Editing this plugin is best done when editing /taboola_sdk/android/ in AndroidStudio and enabling a Gradle dependency on the Flutter.jar placed in libs. -- Add your new method to the onMethodCall() filter function -- After you finish editing in Android Studio, disable the Gradle dependency of Flutter.jar
-
In iOS /taboola_sdk/ios/Classes/SwiftTaboolaSdkPlugin.swift -- Add your new method to the handle() filter function
Source: https://flutter.dev/docs/development/platform-integration/platform-channels
- Inheritance
-
- Object
- PlatformInterface
- TBLPackageInfoPlatform
- TBLSdkPlugin
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
androidInfo(
) → Future< TBLAndroidDevice> -
override
-
getAllPackageInfo(
) → Future< TBLPackageInfoData> -
override
-
iosInfo(
) → Future< TBLIosDevice> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getAdIdOrIdfa(
) → Future< String> - By definition, Android plugin will always return advId, iOS plugin will return an empty String if user has opted out.
-
getIsoCountryCode(
) → Future< String> -
getTrackingStatus(
) → Future< TBLTrackingStatus> -
This method retrieves the tracking status.
It is a static method that returns a Future containing the TrackingStatus enum.
If the platform is iOS, it invokes a native method to get the tracking status
If the platform is not iOS, it returns
TrackingStatus.denied
this logic came fro align Flutter SDK to iOS native. iOS native enum values are: notDetermined, restricted, denied, authorized since Flutter SDK is aligned to iOS native, we are using the same enum values that are passed to ML. ReturnsTrackingStatus
representing the current tracking status. -
isUserOptOut(
) → Future< bool> -
sendExceptionToGUEH(
String stacktrace, String errorMessage, {String? errorReason}) → Future< void> -
setPluginVersion(
) → Future< void>
Constants
- ERROR_MESSAGE_KEY → const String
- ERROR_REASON_KEY → const String
- GET_AD_OR_IDFA → const String
- GET_ALL_APPLICATION_INFO → const String
- GET_ANDROID_DEVICE_INFO → const String
- GET_IOS_DEVICE_INFO → const String
- GET_ISO_COUNTRY_CODE → const String
- GET_TRACKING_AUTHORIZATION_STATUS → const String
- IS_USER_OPT_OUT → const String
- PLUGIN_VERSION → const String
- requestTrackingAuthorization → const String
- SEND_CRASH_TO_GUEH → const String
- SET_PLUGIN_VERSION → const String
- STACKTRACE_KEY → const String
- TABOOLA_SDK_CHANNEL → const String