diff --git a/personalizatio-sdk/build.gradle b/personalizatio-sdk/build.gradle index eb7b5a2b..f131f900 100644 --- a/personalizatio-sdk/build.gradle +++ b/personalizatio-sdk/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'maven-publish' apply plugin: 'signing' -version='1.4.0' +version='1.4.1' android { compileSdkVersion 30 diff --git a/personalizatio-sdk/src/main/java/com/personalizatio/SDK.java b/personalizatio-sdk/src/main/java/com/personalizatio/SDK.java index 75b6393b..697ab2db 100644 --- a/personalizatio-sdk/src/main/java/com/personalizatio/SDK.java +++ b/personalizatio-sdk/src/main/java/com/personalizatio/SDK.java @@ -312,6 +312,17 @@ public static void getSid(Consumer listener) { } } + /** + * Возвращает текущий сегмент для А/В тестирования + */ + public static String getSegment() { + if( instance == null ) { + throw new RuntimeException("You need initialize SDK before request segment"); + } else { + return instance.segment; + } + } + //----------Private---------------> /**