@@ -18,9 +18,9 @@ import com.yandex.metrica.profile.UserProfile
1818import org.json.JSONObject
1919import org.stepic.droid.base.App
2020import org.stepic.droid.configuration.Config
21- import org.stepic.droid.configuration.RemoteConfig
2221import org.stepic.droid.di.AppSingleton
2322import org.stepic.droid.util.isARSupported
23+ import org.stepic.droid.util.isScreenReaderOn
2424import org.stepik.android.domain.base.analytic.AnalyticEvent
2525import org.stepik.android.domain.base.analytic.AnalyticSource
2626import org.stepik.android.domain.base.analytic.UserProperty
@@ -66,17 +66,23 @@ constructor(
6666 .set(AmplitudeAnalytic .Properties .PUSH_PERMISSION , if (isNotificationsEnabled) " granted" else " not_granted" )
6767 .set(AmplitudeAnalytic .Properties .IS_NIGHT_MODE_ENABLED , context.isNightModeEnabled().toString())
6868 .set(AmplitudeAnalytic .Properties .IS_AR_SUPPORTED , context.isARSupported().toString())
69+ .set(AmplitudeAnalytic .Properties .ACCESSIBILITY_FONT_SCALE , context.resources.configuration.fontScale.toString())
70+ .set(AmplitudeAnalytic .Properties .ACCESSIBILITY_SCREEN_READER_ENABLED , context.isScreenReaderOn().toString())
6971 )
7072
7173 updateYandexUserProfile {
7274 apply (Attribute .notificationsEnabled().withValue(isNotificationsEnabled))
7375 apply (Attribute .customBoolean(AmplitudeAnalytic .Properties .IS_NIGHT_MODE_ENABLED ).withValue(context.isNightModeEnabled()))
7476 apply (Attribute .customBoolean(AmplitudeAnalytic .Properties .IS_AR_SUPPORTED ).withValue(context.isARSupported()))
77+ apply (Attribute .customNumber(AmplitudeAnalytic .Properties .ACCESSIBILITY_FONT_SCALE ).withValue(context.resources.configuration.fontScale.toDouble()))
78+ apply (Attribute .customBoolean(AmplitudeAnalytic .Properties .ACCESSIBILITY_SCREEN_READER_ENABLED ).withValue(context.isScreenReaderOn()))
7579 }
7680
7781 setFirebaseUserProperty(AmplitudeAnalytic .Properties .PUSH_PERMISSION , if (isNotificationsEnabled) " granted" else " not_granted" )
7882 setFirebaseUserProperty(AmplitudeAnalytic .Properties .IS_NIGHT_MODE_ENABLED , context.isNightModeEnabled().toString())
7983 setFirebaseUserProperty(AmplitudeAnalytic .Properties .IS_AR_SUPPORTED , context.isARSupported().toString())
84+ setFirebaseUserProperty(AmplitudeAnalytic .Properties .ACCESSIBILITY_FONT_SCALE , context.resources.configuration.fontScale.toString())
85+ setFirebaseUserProperty(AmplitudeAnalytic .Properties .ACCESSIBILITY_SCREEN_READER_ENABLED , context.isScreenReaderOn().toString())
8086 }
8187
8288 // Amplitude properties
0 commit comments