Skip to content

Commit

Permalink
Added 3.0.0-beta.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rimdoo committed Jun 2, 2022
1 parent d8a50cb commit 89c2cdd
Show file tree
Hide file tree
Showing 193 changed files with 3,089 additions and 578 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Change Log

### v3.0.0-beta.3 (Jun 02, 2022) with Core SDK `v3.1.14`
* Synchronized Builder methods and Params methods.
* Added `setErrorText()` in `BannedUserListFragment.Builder`, `ChannelListFragment.Builder`, `MemberListFragment.Builder`, `MutedMemberListFragment.Builder`, `OperatorListFragment.Builder`.
* Added `setOnInputRightButtonClickListener()`, `setOnEditModeCancelButtonClickListener()`, `setOnEditModeSaveButtonClickListener()`, `setOnQuoteReplyModeCloseButtonClickListener()`, `setOnInputModeChangedListener()`, `setUseSuggestedMentionListDivider()`, `setOnTooltipClickListener()`, `setOnScrollBottomButtonClickListener()`, `setErrorText()` in `ChannelFragment.Builder`, `OpenChannelFragment.Builder`.
* Added `setRightButtonText()`, `setOnRightButtonClickListener()` in `ChannelSettings.Builder`.
* Added `setOnRightButtonClickListener()`, `setOnUserSelectChangedListener()`, `setOnUserSelectionCompleteListener()`, `setErrorText()` in `CreateChannelFragment.Builder`, `PromoteOperatorFragment.Builder`.
* Added `setOnInputTextChangedListener()`, `setOnClearButtonClickListener()`, `setErrorText()` in `MessageSearchFragment.Builder`.
* Added `setHeaderRightButtonIconResId()`, `setHeaderRightButtonIcon()`, `setUseHeaderRightButton()`, `setOnHeaderRightButtonClickListener()` in `ModerationFragment.Builder`.
* Added `setOnInputRightButtonClickListener()`, `setOnEditModeCancelButtonClickListener()`, `setOnEditModeSaveButtonClickListener()`, `setOnInputModeChangedListener()`, `setOnScrollBottomButtonClickListener()`, `setOnMessageProfileLongClickListener()`, `setOnMessageInsertedListener()`, `setErrorText()` in `OpenChannelFragment.Builder`.
* Added `setHeaderRightButtonIconResId()`, `setHeaderRightButtonIcon()`, `setUseHeaderRightButton()`, `setOnHeaderRightButtonClickListener()`, `setOnActionItemClickListener()`, `setErrorText()` in `ParticipantListFragment.Builder`.

* Mention improvement
* Added `setStartingPoint(long, boolean)` in `ChannelFragment.Builder`.
* Removed `HighlightMessageInfo` class.
* Removed `setHighlightMessageInfo(HighlightMessageInfo)` in `ChannelFragment.Builder`.
* Removed `setHighlightMessageInfo(HighlightMessageInfo)` and `getHighlightMessageInfo()` in `MessageListAdapter`.
* Removed `setHighlightMessageInfo(HighlightMessageInfo)`, `getHighlightMessageInfo()`, `setSearchedTextUIConfig(TextUIConfig)`, and `setSearchedTextUIConfig(TextUIConfig)` in `MessageListComponent.Params`.
* Removed `setSearchedTextUIConfig(TextUIConfig)` in `ChannelFragment.Builder`.

* Added channel push setting option for sent from mentioned only.
* Added `ChannelPushSettingFragment` and `ChannelPushSettingActivity`.
* Added `ChannelPushSettingViewModel`, `ChannelPushSettingModule`, and `ChannelPushSettingComponent`.

### v3.0.0-beta.2 (Apr 29, 2022) with Core SDK `v3.1.12`
* Supported user mention in `GroupChannel`.
* Now you can send mentioning text to the other users in `GroupChannel`. These following functions are available.
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
buildscript {
repositories {
google()
jcenter()
mavenCentral()

}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath 'com.android.tools.build:gradle:7.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.gms:google-services:4.3.10'
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url "https://jitpack.io" }
maven { url "https://repo.sendbird.com/public/maven" }
}
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
android.enablerD8=true

UIKIT_VERSION = 3.0.0-beta.2
UIKIT_VERSION = 3.0.0-beta.3
UIKIT_VERSION_CODE = 1
6 changes: 3 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Jan 02 16:41:55 KST 2020
#Mon May 02 15:36:41 KST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
zipStoreBase=GRADLE_USER_HOME
5 changes: 2 additions & 3 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include ':uikit'
include ':uikit-sample'
include ':uikit-custom-sample'
rootProject.name='sendbird_uikit_android_sources'
include ':uikit-sample', ':uikit'
rootProject.name='sendbird-uikit-android-sources'
29 changes: 12 additions & 17 deletions uikit-custom-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 30
buildToolsVersion "29.0.3"
compileSdkVersion 32

defaultConfig {
applicationId "com.sendbird.uikit.customsample"
minSdkVersion 21
targetSdkVersion 30
targetSdkVersion 32
versionCode 1
versionName "1.0"
multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField "String", "VERSION_NAME", "\"$UIKIT_VERSION\""
}

buildTypes {
Expand All @@ -36,22 +35,18 @@ android {
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
// implementation project(":uikit")
implementation "com.sendbird.sdk:uikit:3.0.0-beta.2"
implementation "com.sendbird.sdk:uikit:$UIKIT_VERSION"

implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.google.firebase:firebase-messaging:21.0.0'
implementation 'com.google.firebase:firebase-messaging:23.0.3'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'

implementation 'com.google.android.material:material:1.2.1'
implementation 'com.google.android.material:material:1.5.0'

implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.github.bumptech.glide:glide:4.13.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@
import java.util.ArrayList;
import java.util.List;

/**
* Base application to initialize Sendbird UIKit.
*/
public class BaseApplication extends MultiDexApplication {

private static final String APP_ID = "2D7B4CDB-932F-4082-9B09-A1153792DC8D";
private static final MutableLiveData<InitState> initState = new MutableLiveData<>();

/**
* Initializes Sendbird UIKit
*/
@Override
public void onCreate() {
super.onCreate();
Expand Down Expand Up @@ -91,9 +97,12 @@ public void onInitFailed(@NonNull SendBirdException e) {

@Override
public void onInitSucceed() {
// register push notification
PushUtils.registerPushHandler(new MyFirebaseMessagingService());
SendbirdUIKit.setDefaultThemeMode(SendbirdUIKit.ThemeMode.Light);
// set logger
SendbirdUIKit.setLogLevel(SendbirdUIKit.LogLevel.ALL);
// set whether to use user profile
SendbirdUIKit.setUseDefaultUserProfile(false);

initState.setValue(InitState.SUCCEED);
Expand All @@ -102,6 +111,7 @@ public void onInitSucceed() {
}
}, this);

// set custom params
SendbirdUIKit.setCustomParamsHandler(new CustomParamsHandler() {
@Override
public void onBeforeCreateGroupChannel(@NonNull GroupChannelParams groupChannelParams) {
Expand Down Expand Up @@ -134,20 +144,34 @@ public void onBeforeUpdateOpenChannel(@NonNull OpenChannelParams openChannelPara
}
});

// set custom user list query
SendbirdUIKit.setCustomUserListQueryHandler(getCustomUserListQuery());
// set custom UIKit fragment factory
SendbirdUIKit.setUIKitFragmentFactory(new CustomFragmentFactory());
// set whether to use user mention
SendbirdUIKit.setUseUserMention(true);
// set the mention configuration
SendbirdUIKit.setMentionConfig(new UserMentionConfig.Builder()
.setMaxMentionCount(5)
.setMaxSuggestionCount(10)
.build());
}

/**
* Returns the state of the result from initialization of Sendbird UIKit.
*
* @return the {@link InitState} instance
*/
@NonNull
public static LiveData<InitState> initStateChanges() {
return initState;
}

/**
* Returns the user list query to be used to retrieve user list.
*
* @return the {@link CustomUserListQueryHandler} instance
*/
@NonNull
public static CustomUserListQueryHandler getCustomUserListQuery() {
final ApplicationUserListQuery userListQuery = SendBird.createApplicationUserListQuery();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
import com.sendbird.uikit.fragments.PromoteOperatorFragment;
import com.sendbird.uikit.fragments.UIKitFragmentFactory;

/**
* UIKit fragment factory implementation to provide customized fragments.
*/
public class CustomFragmentFactory extends UIKitFragmentFactory {
@NonNull
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
import java.util.List;
import java.util.Map;


/**
* Displays a channel select screen.
*/
public class HomeActivity extends AppCompatActivity {
private ActivityHomeBinding binding;
private static final String USER_EVENT_HANDLER_KEY = "USER_EVENT_HANDLER_KEY" + System.currentTimeMillis();
Expand All @@ -51,6 +53,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
@Override
protected void onResume() {
super.onResume();
// initialize total unread count
SendBird.getTotalUnreadMessageCount(new GroupChannelTotalUnreadMessageCountParams(), (totalCount, e) -> {
if (e != null) {
return;
Expand All @@ -66,6 +69,7 @@ protected void onResume() {
}
});

// register total unread count event
SendBird.addUserEventHandler(USER_EVENT_HANDLER_KEY, new SendBird.UserEventHandler() {
@Override
public void onFriendsDiscovered(List<User> list) {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import com.sendbird.uikit.utils.TextUtils;
import com.sendbird.uikit.widgets.WaitingDialog;

/**
* Displays a login screen.
*/
public class LoginActivity extends AppCompatActivity {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
import java.util.Locale;
import java.util.TimeZone;

/**
* Displays a settings screen.
*/
public class SettingsFragment extends Fragment {
private String[] REQUIRED_PERMISSIONS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import com.sendbird.uikit.log.Logger;
import com.sendbird.uikit.widgets.WaitingDialog;

/**
* Displays a splash screen.
*/
public class SplashActivity extends AppCompatActivity {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
package com.sendbird.uikit.customsample.consts;

/**
* Used with Sendbird UIKit initialization.
*/
public enum InitState {
/**
* Indicates the migrating state.
*/
MIGRATING,
/**
* Indicates the failed state.
*/
FAILED,
/**
* Indicates the succeeded state.
*/
SUCCEED,
;
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@

import java.util.concurrent.atomic.AtomicReference;

/**
* Concrete implementation of a sendbird push handler.
*/
public class MyFirebaseMessagingService extends SendBirdPushHandler {

private static final String TAG = "MyFirebaseMsgService";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
import java.util.Map;
import java.util.Objects;

/**
* Displays a group channel list screen.
*/
public class GroupChannelMainActivity extends AppCompatActivity {
private static final String USER_EVENT_HANDLER_KEY = "USER_EVENT_HANDLER_KEY";
private CustomTabView unreadCountTab;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import com.sendbird.uikit.log.Logger;
import com.sendbird.uikit.modules.components.ChannelHeaderComponent;

/**
* Implements the customized <code>ChannelHeaderComponent</code> used in <code>CustomChannelFragment</code>.
*/
public class CustomChannelHeaderComponent extends ChannelHeaderComponent {
private Toolbar toolbar;
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import com.sendbird.uikit.log.Logger;
import com.sendbird.uikit.modules.components.HeaderComponent;

/**
* Implements the customized <code>HeaderComponent</code> used in <code>CustomChannelListFragment</code>.
*/
public class CustomChannelListHeaderComponent extends HeaderComponent {
@Nullable
private View.OnClickListener settingsButtonClickListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import com.sendbird.uikit.log.Logger;
import com.sendbird.uikit.modules.components.ChannelSettingsHeaderComponent;

/**
* Implements the customized <code>ChannelSettingsHeaderComponent</code>.
*/
public class CustomChannelSettingsHeaderComponent extends ChannelSettingsHeaderComponent {

public CustomChannelSettingsHeaderComponent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import com.sendbird.uikit.customsample.R;
import com.sendbird.uikit.modules.components.ChannelSettingsMenuComponent;

/**
* Implements the customized <code>ChannelSettingsMenuComponent</code>.
*/
public class CustomChannelSettingsMenuComponent extends ChannelSettingsMenuComponent {
private View view;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

import java.util.List;

/**
* Implements the customized <code>MessageInputComponent</code>.
*/
public class CustomMessageInputComponent extends MessageInputComponent {
private final static String MODE_MENU = "MODE_MENU";
private final static String MODE_EMOJI = "MODE_EMOJI";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
import com.sendbird.uikit.modules.components.MessageSearchHeaderComponent;
import com.sendbird.uikit.utils.TextUtils;

/**
* Implements the customized <code>MessageSearchHeaderComponent</code>.
*/
public class CustomMessageSearchHeaderComponent extends MessageSearchHeaderComponent {
private EditText input;
@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
import com.sendbird.uikit.customsample.R;
import com.sendbird.uikit.modules.components.HeaderComponent;

/**
* Implements the customized <code>HeaderComponent</code> used in <code>CustomModerationFragment</code>.
*/
public class CustomModerationHeaderComponent extends HeaderComponent {
public CustomModerationHeaderComponent() {
super();
Expand Down
Loading

0 comments on commit 89c2cdd

Please sign in to comment.