Skip to content

Homesso integration#1

Open
Raasesh-Vizbee wants to merge 8 commits into
masterfrom
homesso-integration
Open

Homesso integration#1
Raasesh-Vizbee wants to merge 8 commits into
masterfrom
homesso-integration

Conversation

@Raasesh-Vizbee

Copy link
Copy Markdown
Contributor

HomeSSO code added for demo app.

Comment thread app/src/main/java/tv/vizbee/demo/retrofit/ApiInterface.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/activity/MainActivity.kt
Comment on lines +44 to +45
val bundle = intent.extras
if (bundle != null) {

@SreenuVB SreenuVB Aug 1, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can directly use
intent.extras?.let {
var launchLogin = bundle.getBoolean(VizbeeHomeSSOAdapter.INTENT_LAUNCH_LOGIN_SCREEN)
if (launchLogin) {
Logger.d(LOG_TAG, "LoginFragment Launch Called")
showUserLoginFragment()
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread app/src/main/java/tv/vizbee/demo/fragments/UserLoginFragment.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/fragments/UserLoginFragment.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/helper/SharedPreferenceHelper.kt Outdated
data class LoginRequest(
val email: String,
val pwd: String,
val deviceId: String

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use default value for the deviceId since its constant through out

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread app/src/main/java/tv/vizbee/demo/vizbee/VizbeeHomeSSOAdapter.kt Outdated

companion object {
private const val LOG_TAG = "VizbeeHomeSSOAdapter"
var INTENT_LAUNCH_LOGIN_SCREEN: String = "INTENT_LAUNCH_LOGIN_SCREEN"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make it const and val

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread README.md Outdated
Comment thread README.md
Comment thread README.md Outdated
Comment thread app/src/main/java/tv/vizbee/demo/activity/MainActivity.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/activity/MainActivity.kt Outdated
// ---------------------------
// [BEGIN] Vizbee Integration
// ---------------------------
VizbeeHomeSSOAdapter().updateRegCodeStatus(body.authToken)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we asking them to update reg code status every time they login without checking whether it’s been requested by TV (via HomeSSO adapter)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we need to send arg from HomeSSO Adapter.
Right now, every time MainActivity is launched and there’s an intent, we are launching LoginFragment. This isn’t a correct approach.

Comment thread app/src/main/java/tv/vizbee/demo/fragments/UserLoginFragment.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/network/ApiInterface.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/vizbee/VizbeeHomeSSOAdapter.kt Outdated
Comment thread app/src/main/java/tv/vizbee/demo/network/ApiInterface.kt Outdated

@radhakrishna-vizbee radhakrishna-vizbee left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have given some comments, please check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants