diff --git a/README.md b/README.md index b843c19..77b6205 100644 --- a/README.md +++ b/README.md @@ -68,19 +68,20 @@ This demo support Android device with **Android 7.0** or later ``` dependencies { - implementation 'com.ciscowebex:androidsdk:3.0.0@aar' + implementation 'com.ciscowebex:androidsdk:3.1.0@aar' } ``` ## Usage For example see [README](https://github.com/webex/webex-android-sdk/blob/master/README.md) - + ## Note - + Please update below constants in gradle.properties ``` CLIENT_ID="" CLIENT_SECRET="" + SCOPE="" REDIRECT_URI="" ``` \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 1500b40..a0d27fc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -19,12 +19,13 @@ android { applicationId "com.cisco.sdk_android" minSdkVersion Versions.minSdk targetSdkVersion Versions.targetSdk - versionCode 30001 - versionName "3.0.0" + versionCode 30003 + versionName "3.1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "String", "CLIENT_ID", "${CLIENT_ID}" buildConfigField "String", "CLIENT_SECRET", "${CLIENT_SECRET}" + buildConfigField "String", "SCOPE", "${SCOPE}" buildConfigField "String", "REDIRECT_URI", "${REDIRECT_URI}" } @@ -41,10 +42,27 @@ android { buildFeatures { dataBinding true } + splits { + // Configures multiple APKs based on ABI. + abi { + // Enables building multiple APKs per ABI. + enable true + + // By default all ABIs are included, so use reset() and include to specify that we only + // want APKs for x86, armeabi-v7a, and mips. + reset() + + // Specifies a list of ABIs that Gradle should create APKs for. + include "x86", "x86_64", "armeabi-v7a", "arm64-v8a" + + // Specifies that we want to also generate a universal APK that includes all ABIs. + universalApk true + } + } } dependencies { - implementation 'com.ciscowebex:androidsdk:3.0.0@aar' + implementation 'com.ciscowebex:androidsdk:3.1.0@aar' implementation fileTree(dir: "libs", include: ["*.jar"]) implementation Dependencies.kotlinStdLib diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/HomeActivity.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/HomeActivity.kt index 8a4fc94..d751b16 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/HomeActivity.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/HomeActivity.kt @@ -24,6 +24,7 @@ import com.ciscowebex.androidsdk.kitchensink.calling.CallActivity import com.ciscowebex.androidsdk.kitchensink.extras.ExtrasActivity import com.ciscowebex.androidsdk.kitchensink.search.SearchActivity import com.ciscowebex.androidsdk.kitchensink.setup.SetupActivity +import com.ciscowebex.androidsdk.phone.Phone import org.koin.android.ext.android.inject class HomeActivity : BaseActivity() { @@ -41,6 +42,10 @@ class HomeActivity : BaseActivity() { webexViewModel.setLogLevel(webexViewModel.logFilter) webexViewModel.enableConsoleLogger(webexViewModel.isConsoleLoggerEnabled) + Log.d(tag, "Service URls METRICS: ${webexViewModel.getServiceUrl(Phone.ServiceUrlType.METRICS)}" + + "\nCLIENT_LOGS: ${webexViewModel.getServiceUrl(Phone.ServiceUrlType.CLIENT_LOGS)}" + + "\nKMS: ${webexViewModel.getServiceUrl(Phone.ServiceUrlType.KMS)}") + authenticator?.let { when (it) { is OAuthWebViewAuthenticator -> { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/OAuthWebexModule.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/OAuthWebexModule.kt index b012701..2b6362c 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/OAuthWebexModule.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/OAuthWebexModule.kt @@ -12,9 +12,10 @@ val OAuthWebexModule = module { single (named("oAuth")) { val clientId = BuildConfig.CLIENT_ID val clientSecret = BuildConfig.CLIENT_SECRET + val additionalScopes = BuildConfig.SCOPE val redirectUri = BuildConfig.REDIRECT_URI val email = getEmailPref(androidApplication()).orEmpty() - OAuthWebViewAuthenticator(clientId, clientSecret, redirectUri, email) + OAuthWebViewAuthenticator(clientId, clientSecret, additionalScopes, redirectUri, email) } factory { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/WebexViewModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/WebexViewModel.kt index d11c5b3..3b309e8 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/WebexViewModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/WebexViewModel.kt @@ -749,4 +749,32 @@ class WebexViewModel(val webex: Webex, val repository: WebexRepository) : BaseVi fun openAuxStream(view: View) { getCall(currentCallId.orEmpty())?.openAuxStream(view) } + + fun hasAnyoneJoined(): Boolean { + return getCall(currentCallId.orEmpty())?.hasAnyoneJoined() ?: false + } + + fun isMeeting(): Boolean { + return getCall(currentCallId.orEmpty())?.isMeeting() ?: false + } + + fun isPmr(): Boolean { + return getCall(currentCallId.orEmpty())?.isPmr() ?: false + } + + fun isSelfCreator(): Boolean { + return getCall(currentCallId.orEmpty())?.isSelfCreator() ?: false + } + + fun isSpaceMeeting(): Boolean { + return getCall(currentCallId.orEmpty())?.isSpaceMeeting() ?: false + } + + fun isScheduledMeeting(): Boolean { + return getCall(currentCallId.orEmpty())?.isScheduledMeeting() ?: false + } + + fun getServiceUrl(type: Phone.ServiceUrlType): String? { + return webex.phone.getServiceUrl(type) + } } \ No newline at end of file diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/JWTLoginActivity.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/JWTLoginActivity.kt index 566df3c..7476de1 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/JWTLoginActivity.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/JWTLoginActivity.kt @@ -62,6 +62,11 @@ class JWTLoginActivity : AppCompatActivity() { } }) + loginViewModel.errorData.observe(this@JWTLoginActivity, Observer { errorMessage -> + progressLayout.visibility = View.GONE + onLoginFailed(errorMessage) + }) + loginViewModel.initialize() } } @@ -75,8 +80,9 @@ class JWTLoginActivity : AppCompatActivity() { finish() } - private fun onLoginFailed() { + private fun onLoginFailed(failureMessage: String = getString(R.string.jwt_login_failed)) { binding.loginButton.visibility = View.VISIBLE binding.loginFailedTextView.visibility = View.VISIBLE + binding.loginFailedTextView.text = failureMessage } } \ No newline at end of file diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginRepository.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginRepository.kt index 2841125..aaff8f7 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginRepository.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginRepository.kt @@ -1,5 +1,6 @@ package com.ciscowebex.androidsdk.kitchensink.auth +import android.util.Log import android.webkit.WebView import com.ciscowebex.androidsdk.Webex import com.ciscowebex.androidsdk.auth.JWTAuthenticator @@ -12,6 +13,7 @@ class LoginRepository() { fun authorizeOAuth(loginWebview: WebView, oAuthAuthenticator: OAuthWebViewAuthenticator): Observable { return Single.create { emitter -> oAuthAuthenticator.authorize(loginWebview, CompletionHandler { result -> + Log.d("LoginRepository:authorizeOAuth ", "isAuthorized : ${oAuthAuthenticator.isAuthorized()}") if (result.error != null) { emitter.onError(Throwable(result.error?.errorMessage)) } else { @@ -24,6 +26,7 @@ class LoginRepository() { fun initialize(webex: Webex): Observable { return Single.create { emitter -> webex.initialize(CompletionHandler { result -> + Log.d("LoginRepository:initialize ", "isAuthorized : ${webex.authenticator?.isAuthorized()}") if (result.error != null) { emitter.onError(Throwable(result.error?.errorMessage)) } else { @@ -36,6 +39,7 @@ class LoginRepository() { fun loginWithJWT(token: String, jwtAuthenticator: JWTAuthenticator): Observable { return Single.create { emitter -> jwtAuthenticator.authorize(token, CompletionHandler { result -> + Log.d("LoginRepository:loginWithJWT ", "isAuthorized : ${jwtAuthenticator.isAuthorized()}") if (result.error != null) { emitter.onError(Throwable(result.error?.errorMessage)) } else { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginViewModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginViewModel.kt index e484c48..9afded7 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginViewModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/auth/LoginViewModel.kt @@ -43,7 +43,9 @@ class LoginViewModel(private val webex: Webex, private val loginRepository: Logi jwtAuthenticator?.let { auth -> loginRepository.loginWithJWT(token, auth).observeOn(AndroidSchedulers.mainThread()).subscribe({ _isAuthorized.postValue(it) - }, {_isAuthorized.postValue(false)}).autoDispose() + }, { + _errorData.postValue(it.message) + }).autoDispose() } ?: run { _isAuthorized.postValue(false) } diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/calling/CallControlsFragment.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/calling/CallControlsFragment.kt index 1beb156..99bb2a2 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/calling/CallControlsFragment.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/calling/CallControlsFragment.kt @@ -153,7 +153,13 @@ class CallControlsFragment : Fragment(), OnClickListener, CallObserverInterface } override fun onConnected(call: Call?) { - Log.d(TAG, "CallObserver onConnected : " + call?.getCallId()) + Log.d(TAG, "CallObserver onConnected callId: ${call?.getCallId()}, hasAnyoneJoined: ${webexViewModel.hasAnyoneJoined()}, " + + "isMeeting: ${webexViewModel.isMeeting()}," + + "isPmr: ${webexViewModel.isPmr()}," + + "isSelfCreator: ${webexViewModel.isSelfCreator()}," + + "isSpaceMeeting: ${webexViewModel.isSpaceMeeting()}"+ + "isScheduledMeeting: ${webexViewModel.isScheduledMeeting()}") + onCallConnected(call?.getCallId().orEmpty()) ringerManager.stopRinger(if (isIncomingActivity) RingerManager.RingerType.Incoming else RingerManager.RingerType.Outgoing) webexViewModel.sendDTMF(call?.getCallId().orEmpty(), "2") @@ -1507,6 +1513,14 @@ class CallControlsFragment : Fragment(), OnClickListener, CallObserverInterface override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) + handleActivityResult(requestCode, resultCode, data) + } + + private fun handleActivityResult( + requestCode: Int, + resultCode: Int, + data: Intent? + ) { if (requestCode == REQUEST_CODE && resultCode == Activity.RESULT_OK) { val callNumber = data?.getStringExtra(CALLER_ID) ?: "" //start call association to add new person on call diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/extras/ExtrasViewModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/extras/ExtrasViewModel.kt index 8246f25..99e6ef1 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/extras/ExtrasViewModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/extras/ExtrasViewModel.kt @@ -24,7 +24,9 @@ class ExtrasViewModel(private val extrasRepository: ExtrasRepository) : BaseView fun getRefreshToken() { extrasRepository.getRefreshToken().observeOn(AndroidSchedulers.mainThread()).subscribe({ _refreshToken.postValue(it) - }, { _refreshToken.postValue(null) }).autoDispose() + }, { + _refreshToken.postValue(it.message) + }).autoDispose() } fun getJwtAccessTokenExpiration(): Date? { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/composer/MessageComposerActivity.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/composer/MessageComposerActivity.kt index 02ec3c9..3f458e2 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/composer/MessageComposerActivity.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/composer/MessageComposerActivity.kt @@ -184,6 +184,14 @@ class MessageComposerActivity : AppCompatActivity() { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) + handleActivityResult(requestCode, resultCode, data) + } + + private fun handleActivityResult( + requestCode: Int, + resultCode: Int, + data: Intent? + ) { if (requestCode == PICKFILE_REQUEST_CODE && resultCode == Activity.RESULT_OK) { data?.let { intent -> intent.clipData?.let { data -> diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceModel.kt index fc19471..d4344e5 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceModel.kt @@ -4,7 +4,7 @@ import com.ciscowebex.androidsdk.space.Space import com.ciscowebex.androidsdk.space.Space.SpaceType import java.util.* -data class SpaceModel(val id: String, val title: String, val spaceType: SpaceType, val isLocked: Boolean, val lastActivity: Date, val created: Date, val teamId: String, val sipAddress: String) { +data class SpaceModel(val id: String, val title: String, val spaceType: SpaceType?, val isLocked: Boolean, val lastActivity: Date, val created: Date, val teamId: String, val sipAddress: String) { val createdDateTimeString: String = created.toString() val lastActivityTimestampString: String = lastActivity.toString() @@ -34,8 +34,7 @@ data class SpaceModel(val id: String, val title: String, val spaceType: SpaceTyp companion object { fun convertToSpaceModel(space: Space?): SpaceModel { - return SpaceModel(space?.id.orEmpty(), space?.title.orEmpty(), space?.type - ?: SpaceType.NONE, + return SpaceModel(space?.id.orEmpty(), space?.title.orEmpty(), space?.type, space?.isLocked ?: false, space?.lastActivity ?: Date(), space?.created ?: Date(), space?.teamId.orEmpty(), space?.sipAddress.orEmpty()) diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceReadStatusModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceReadStatusModel.kt index 36af047..57191ba 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceReadStatusModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpaceReadStatusModel.kt @@ -4,8 +4,8 @@ import com.ciscowebex.androidsdk.space.SpaceReadStatus import com.ciscowebex.androidsdk.space.Space.SpaceType import java.util.* -data class SpaceReadStatusModel(val spaceId: String, val spaceType: SpaceType, val lastActivityDate: Date, val lastSeenDate: Date) { - val spaceTypeString: String = spaceType.name +data class SpaceReadStatusModel(val spaceId: String, val spaceType: SpaceType?, val lastActivityDate: Date, val lastSeenDate: Date) { + val spaceTypeString: String = spaceType?.name.orEmpty() val lastSeenDateTimeString: String = lastSeenDate.toString() val lastActivityTimestampString: String = lastActivityDate.toString() val isSpaceUnread: Boolean = lastActivityDate > lastSeenDate @@ -29,8 +29,7 @@ data class SpaceReadStatusModel(val spaceId: String, val spaceType: SpaceType, v companion object { fun convertToSpaceReadStatusModel(spaceReadStatus: SpaceReadStatus?): SpaceReadStatusModel { - return SpaceReadStatusModel(spaceReadStatus?.id.orEmpty(),spaceReadStatus?.type - ?: SpaceType.NONE, spaceReadStatus?.lastActivityDate ?: Date(), + return SpaceReadStatusModel(spaceReadStatus?.id.orEmpty(), spaceReadStatus?.type, spaceReadStatus?.lastActivityDate ?: Date(), spaceReadStatus?.lastSeenDate ?: Date()) } } diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesFragment.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesFragment.kt index 939b3eb..6db1774 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesFragment.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesFragment.kt @@ -144,6 +144,14 @@ class SpacesFragment : Fragment() { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) + handleActivityResult(requestCode, resultCode, data) + } + + private fun handleActivityResult( + requestCode: Int, + resultCode: Int, + data: Intent? + ) { if (requestCode == requestCodeSearchPersonToAddToSpace && resultCode == Activity.RESULT_OK) { val person = data?.getParcelableExtra(Constants.Intent.PERSON) if (person != null) { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesRepository.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesRepository.kt index dbc5b2b..49b8dbc 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesRepository.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/spaces/SpacesRepository.kt @@ -11,7 +11,7 @@ import io.reactivex.Single class SpacesRepository(private val webex: Webex) : MessagingRepository(webex) { fun fetchSpacesList(teamId: String?, maxSpaces: Int): Observable> { return Single.create> { emitter -> - webex.spaces.list(teamId, maxSpaces, SpaceType.NONE, SortBy.ID, CompletionHandler { result -> + webex.spaces.list(teamId, maxSpaces, null, SortBy.ID, CompletionHandler { result -> if (result.isSuccessful) { emitter.onSuccess(result.data?.map { SpaceModel.convertToSpaceModel(it) diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/TeamsFragment.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/TeamsFragment.kt index c527498..cfa1b63 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/TeamsFragment.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/TeamsFragment.kt @@ -182,6 +182,14 @@ class TeamsFragment : Fragment() { override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) + handleActivityResult(requestCode, resultCode, data) + } + + private fun handleActivityResult( + requestCode: Int, + resultCode: Int, + data: Intent? + ) { if (requestCode == requestCodeSearchPersonToAddToTeam && resultCode == Activity.RESULT_OK) { val person = data?.getParcelableExtra(Constants.Intent.PERSON) if (person != null) { diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipFragment.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipFragment.kt index c759bad..b5aecd5 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipFragment.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipFragment.kt @@ -23,7 +23,6 @@ class TeamMembershipFragment : Fragment() { lateinit var binding: FragmentMembershipBinding private val membershipViewModel: TeamMembershipViewModel by inject() - private var teamId: String? = null companion object { fun newInstance(teamId: String): TeamMembershipFragment { @@ -38,7 +37,7 @@ class TeamMembershipFragment : Fragment() { } override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { - teamId = arguments?.getString(Constants.Bundle.TEAM_ID) + val teamId = arguments?.getString(Constants.Bundle.TEAM_ID) ?: "" membershipViewModel.teamId = teamId return FragmentMembershipBinding.inflate(inflater, container, false) .also { binding = it } diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipRepository.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipRepository.kt index 91a3d49..eb96aef 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipRepository.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipRepository.kt @@ -7,7 +7,7 @@ import io.reactivex.Observable import io.reactivex.Single class TeamMembershipRepository(private val webex: Webex) { - fun getTeamMemberships(teamId: String?, max: Int): Observable> { + fun getTeamMemberships(teamId: String, max: Int): Observable> { return Single.create> { emitter -> webex.teamMembershipClient.list(teamId, max, CompletionHandler { result -> Log.d(TeamMembershipRepository::class.java.name, "result: " + result.data) diff --git a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipViewModel.kt b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipViewModel.kt index 166d5c4..768e93b 100644 --- a/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipViewModel.kt +++ b/app/src/main/java/com/ciscowebex/androidsdk/kitchensink/messaging/teams/membership/TeamMembershipViewModel.kt @@ -6,7 +6,7 @@ import com.ciscowebex.androidsdk.kitchensink.BaseViewModel import io.reactivex.android.schedulers.AndroidSchedulers class TeamMembershipViewModel(private val membershipRepo: TeamMembershipRepository) : BaseViewModel() { - var teamId: String? = null + var teamId: String = "" private val _memberships = MutableLiveData>() val memberships: LiveData> = _memberships diff --git a/app/src/main/res/layout/list_item_space_message.xml b/app/src/main/res/layout/list_item_space_message.xml index b10322b..bddc247 100644 --- a/app/src/main/res/layout/list_item_space_message.xml +++ b/app/src/main/res/layout/list_item_space_message.xml @@ -22,15 +22,11 @@ android:layout_height="1dp" android:background="@color/lightGray" app:layout_constraintTop_toTopOf="parent" - android:layout_marginTop="4dp" - android:visibility="@{message.reply? view.GONE: view.VISIBLE}"/> + android:layout_marginTop="4dp"/>