-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathLDNative.Android.cs
More file actions
39 lines (35 loc) · 1.23 KB
/
LDNative.Android.cs
File metadata and controls
39 lines (35 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using LaunchDarkly.SessionReplay;
#if ANDROID
namespace LaunchDarkly.Observability;
internal static class LDNativeAndroidMapping
{
public static global::LDObserveAndroid.LDObservabilityOptions ToNative(this ObservabilityOptions options)
{
return new global::LDObserveAndroid.LDObservabilityOptions(
options.IsEnabled,
options.ServiceName,
options.ServiceVersion,
options.OtlpEndpoint,
options.BackendUrl,
options.ContextFriendlyName,
DictionaryTypeConverters.ToJavaDictionary(options.Attributes),
options.Instrumentation.LaunchTimes
);
}
public static global::LDObserveAndroid.LDSessionReplayOptions ToNative(this SessionReplayOptions options)
{
var nativePrivacy = new global::LDObserveAndroid.LDPrivacyOptions(
options.Privacy.MaskTextInputs,
options.Privacy.MaskWebViews,
options.Privacy.MaskLabels,
options.Privacy.MaskImages,
options.Privacy.MinimumAlpha
);
return new global::LDObserveAndroid.LDSessionReplayOptions(
options.IsEnabled,
options.ServiceName,
nativePrivacy
);
}
}
#endif