Class LoginActivity<V extends LoginView,P extends LoginPresenter<V>>
- java.lang.Object
-
- android.content.Context
-
- android.content.ContextWrapper
-
- android.view.ContextThemeWrapper
-
- android.app.Activity
-
- androidx.core.app.ComponentActivity
-
- androidx.activity.ComponentActivity
-
- androidx.fragment.app.FragmentActivity
-
- androidx.appcompat.app.AppCompatActivity
-
- com.cheetahdigital.uikit.application.BaseActivity
-
- com.cheetahdigital.uikit.application.ThemedActivity
-
- com.cheetahdigital.uikit.architecture.mvp.MvpActivityView<V,P>
-
- com.cheetahdigital.authentication.ui.login.LoginActivity<V,P>
-
- All Implemented Interfaces:
android.content.ComponentCallbacks
,android.content.ComponentCallbacks2
,android.view.KeyEvent.Callback
,android.view.LayoutInflater.Factory
,android.view.LayoutInflater.Factory2
,android.view.View.OnCreateContextMenuListener
,android.view.Window.Callback
,androidx.activity.contextaware.ContextAware
,androidx.activity.OnBackPressedDispatcherOwner
,androidx.activity.result.ActivityResultCaller
,androidx.activity.result.ActivityResultRegistryOwner
,androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider
,androidx.appcompat.app.AppCompatCallback
,androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback
,androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator
,androidx.core.app.TaskStackBuilder.SupportParentable
,androidx.core.view.KeyEventDispatcher.Component
,androidx.lifecycle.HasDefaultViewModelProviderFactory
,androidx.lifecycle.LifecycleOwner
,androidx.lifecycle.ViewModelStoreOwner
,androidx.savedstate.SavedStateRegistryOwner
,CryptographyTaskListener
,LoginView
,com.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
,com.cheetahdigital.uikit.architecture.mvp.MvpView
,com.cheetahdigital.uikit.helper.permissions.AccountsPermissionHelper.AccountPermissionCallback
,com.cheetahdigital.uikit.helper.socialmedia.FacebookHelper.FacebookLoginCallBack
,com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks
,com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener
,com.google.android.gms.common.api.internal.ConnectionCallbacks
,com.google.android.gms.common.api.internal.OnConnectionFailedListener
public abstract class LoginActivity<V extends LoginView,P extends LoginPresenter<V>> extends com.cheetahdigital.uikit.architecture.mvp.MvpActivityView<V,P> implements LoginView, com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks, com.cheetahdigital.uikit.helper.socialmedia.FacebookHelper.FacebookLoginCallBack, com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener, com.cheetahdigital.uikit.helper.permissions.AccountsPermissionHelper.AccountPermissionCallback, CryptographyTaskListener
AbstractActivity
class which let's the user Login or Register to the Stellar API. These are the currently supported login/register methods:- Email and Password
- Google/Apple Sign In
To successfully use google and apple login, please add the necessary google-services.json
- Facebook
To successfully use facebook login, please add proper R.string.facebook_app_id, R.string.facebook_authority and R.string.facebook_namespace, in you strings.xml
- Twitter
To successfully use twitter login, please add proper R.string.com.twitter.sdk.android.CONSUMER_KEY, and R.string.com.twitter.sdk.android.CONSUMER_SECRET in you strings.xml
There is also a Register Button which, when clicked, subsequently calls
onRegisterButtonClicked()
. Ideally, you would usually direct them to aRegistrationActivity
to let them Register via Email and Password. Ideally, you may place add in intent filter when declaring your own registration activity in Android Manifest.xml <intent-filter> <action android:name="${applicationId}.REGISTRATION" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter>On successful login, the
onLogin()
will be called, on which you should continue with the nextActivity
.Can receive the following intent extras:
EXTRA_INTENT_DEEPLINK
- the deeplink urlLOGIN_VIA_MOBILE_PHONE
-true,if mobile phone should be used to login, otherwise, false. Default value: falseENABLE_MOBILE_PHONE_VALIDATION
- true if mobile phone must be validated, otherwise, false. Default value: trueENABLE_BIOMETRICS
- true to enable using of biometrics, false. Default value: trueIntentKey.PRIMARY_PARAMS
-AuthenticationFieldParams
to use
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
APPLE
static java.lang.String
ASSERTION_VALUE
static java.lang.String
ENABLE_BIOMETRICS
static java.lang.String
ENABLE_GEOFENCING
static java.lang.String
ENABLE_MOBILE_PHONE_VALIDATION
protected boolean
encrypting
static java.lang.String
EXTRA_INTENT_DEEPLINK
static java.lang.String
FACEBOOK
static java.lang.String
GOOGLE
static java.lang.String
INSTAGRAM
static java.lang.String
LOGIN_VIA_MOBILE_PHONE
protected CryptographyTask
mAuthTask
protected AuthenticationCallback
mBiometricsAuthListener
BiometricsDialogManager
mBiometricsDialogManager
protected javax.crypto.Cipher
mCipher
static java.lang.String
MEMBER_ATTRIBUTE
protected android.app.ProgressDialog
mProgressDialog
static java.lang.String
PASSWORD_VALUE
static java.lang.String
TAG
static java.lang.String
TWITTER
-
Fields inherited from class android.app.Activity
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
-
Fields inherited from class android.content.Context
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_INCLUDE_CAPABILITIES, BIND_NOT_FOREGROUND, BIND_NOT_PERCEPTIBLE, BIND_WAIVE_PRIORITY, BIOMETRIC_SERVICE, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, CROSS_PROFILE_APPS_SERVICE, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, EUICC_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, ROLE_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
-
-
Constructor Summary
Constructors Constructor Description LoginActivity()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected P
createPresenter()
InstantiateMvpActivityView.mPresenter
to be used for thisMvpActivityView
android.view.View.OnClickListener
getAboutAppButtonClickListenerButton()
Get about app button click listenerprotected int
getContentLayoutId()
Provide the Content Layout ID which is of a Layout Resource Reference of AndroidDecryptPasswordListener
getDecryptStringListener()
Get decrypt string listenerRegisterBiometricsListener
getFingerPrintListener()
Get Fingerprint listenerandroid.view.View.OnClickListener
getForgotButtonClickListener()
Get Forgot button listenerandroid.view.View.OnClickListener
getGoogleSignInButtonClickListenerButton()
Get Google sign in button click listenerGoogleSignInTaskCallback
getGoogleSignInCallback()
Get google sign in callbackandroid.view.View.OnClickListener
getLoginButtonListener()
Get login button listenerandroid.view.View.OnClickListener
getLogoutButtonClickListenerButton()
Get Logout button listenerandroid.view.View.OnClickListener
getRegisterButtonClickListenerButton()
Get Register button click listenerint
getScreenName()
Returns the screen name to display.protected com.twitter.sdk.android.core.Callback<com.twitter.sdk.android.core.TwitterSession>
getTwitterCallback()
Get Twitter callback to handle twitter actionsprotected void
initializeFacebookButtonLogin()
Method to initialize facebook button login with default permissions (public_profile and email)protected void
onAboutAppClicked()
Launch About App intentvoid
onAccountPermissionDenied()
void
onAccountPermissionGranted()
void
onActivityResult(int requestCode, int resultCode, android.content.Intent data)
void
onConnected(android.os.Bundle bundle)
void
onConnectionFailed(com.google.android.gms.common.ConnectionResult connectionResult)
void
onConnectionSuspended(int i)
void
onCreate(android.os.Bundle savedInstanceState)
void
onCryptographyFailed(boolean forRegistration)
Implement method after cryptography execution failed from {CryptographyTask
}void
onCryptographySuccess(boolean forRegistration, androidx.biometric.BiometricPrompt.CryptoObject cryptoObject)
Implement method after successfully receiving {BiometricPrompt.CryptoObject
} from {CryptographyTask
}void
onFacebookLoginCancelled()
void
onFacebookLoginError(com.facebook.FacebookException e)
void
onFacebookLoginSuccess(com.facebook.login.LoginResult loginResult)
protected void
onForgotPasswordButtonClick()
Method called when forgot password button is clickedprotected void
onGoogleSignInButtonClick()
Method when google plus button is clickedabstract void
onLogin()
Abstract method which will be called when Login is successful.protected void
onLoginClick()
void
onLoginSuccess()
Callback after a successful login attempt.protected void
onLogoutButtonClick()
Method when logout button is clickedvoid
onPause()
abstract void
onRegisterButtonClicked()
Abstract method which will be called when Register Button is clicked.void
onResume()
void
onStart()
void
receivedInfo(java.util.Map<java.lang.String,java.lang.Object> data)
Callback after a successful request for info apivoid
resetPasswordAndDeepLinkingCheck()
Checks if the user is required to change its password and if there's a pending deep link intent.void
setAboutAppButtonClickListener(android.view.View.OnClickListener listener)
Set About app button click listenervoid
setDecryptStringListener(DecryptPasswordListener decryptPasswordListener)
Set Decrypt String Listenervoid
setFingerPrintListener(RegisterBiometricsListener fingerPrintListener)
Set Fingerprint listenervoid
setForgotButtonClickListener(android.view.View.OnClickListener listener)
Set forgot button listenervoid
setGoogleSignInButtonClickListener(android.view.View.OnClickListener listener)
Set google sign in button click listenervoid
setGoogleSignInCallBack(GoogleSignInTaskCallback googleSignInCallBack)
Set Google SignIn Callbackvoid
setLoginButtonListener(android.view.View.OnClickListener loginListener)
Set Login Button Listenervoid
setLogoutButtonClickListener(android.view.View.OnClickListener listener)
Set Logout Button Listenervoid
setRegisterButtonClickListener(android.view.View.OnClickListener listener)
Set Register button click listenerprotected void
setupAppleLoginButton()
Sets up the callback for the Apple Login Buttonvoid
showLoginError(java.lang.String error, int errorCode)
Callback after an unsuccessful login attempt.void
showProgressDialog(boolean show)
Shows Progress Dialog if paramater is truevoid
showResetPassword()
Redirects the app to the Reset Password Activity-
Methods inherited from class com.cheetahdigital.uikit.architecture.mvp.MvpActivityView
captureSharedElementValues, getEnterTransition, getExitTransition, getPresenter, getReenterTransition, getReturnTransition, getSharedElementViews, initSharedElementValues, isSharedAnimationEnabled, onDestroy, startActivity, startActivityForResult
-
Methods inherited from class com.cheetahdigital.uikit.application.ThemedActivity
attachBaseContext, getAction, getIntentAction, handleShake, isShakeHandlingEnabled, onOptionsItemSelected, registerShakeListener, startActivity, startActivityForResult, unregisterShakeListener
-
Methods inherited from class androidx.appcompat.app.AppCompatActivity
addContentView, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onKeyDown, onMenuItemSelected, onMenuOpened, onNightModeChanged, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onSaveInstanceState, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
-
Methods inherited from class androidx.fragment.app.FragmentActivity
dump, getSupportFragmentManager, getSupportLoaderManager, onAttachFragment, onCreatePanelMenu, onCreateView, onCreateView, onLowMemory, onMultiWindowModeChanged, onNewIntent, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onRequestPermissionsResult, onResumeFragments, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityFromFragment, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode
-
Methods inherited from class androidx.activity.ComponentActivity
addOnContextAvailableListener, getActivityResultRegistry, getDefaultViewModelProviderFactory, getLastCustomNonConfigurationInstance, getLifecycle, getOnBackPressedDispatcher, getSavedStateRegistry, getViewModelStore, onBackPressed, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, peekAvailableContext, registerForActivityResult, registerForActivityResult, removeOnContextAvailableListener, startIntentSenderForResult, startIntentSenderForResult
-
Methods inherited from class androidx.core.app.ComponentActivity
dispatchKeyShortcutEvent, getExtraData, putExtraData, superDispatchKeyEvent
-
Methods inherited from class android.app.Activity
closeContextMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onGetDirectActions, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onOptionsMenuClosed, onPerformDirectAction, onPictureInPictureModeChanged, onPostCreate, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onTopResumedActivityChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, overridePendingTransition, postponeEnterTransition, recreate, registerActivityLifecycleCallbacks, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setContentTransitionManager, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setInheritShowWhenLocked, setIntent, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setShowWhenLocked, setTaskDescription, setTitle, setTitle, setTitleColor, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterActivityLifecycleCallbacks, unregisterForContextMenu
-
Methods inherited from class android.view.ContextThemeWrapper
applyOverrideConfiguration, getAssets, getTheme, setTheme
-
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, bindService, bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceiver, updateServiceGroup
-
Methods inherited from class android.content.Context
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.cheetahdigital.authentication.ui.login.LoginView
processErrorWithMember
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
EXTRA_INTENT_DEEPLINK
public static final java.lang.String EXTRA_INTENT_DEEPLINK
- See Also:
- Constant Field Values
-
LOGIN_VIA_MOBILE_PHONE
public static final java.lang.String LOGIN_VIA_MOBILE_PHONE
- See Also:
- Constant Field Values
-
ENABLE_MOBILE_PHONE_VALIDATION
public static final java.lang.String ENABLE_MOBILE_PHONE_VALIDATION
- See Also:
- Constant Field Values
-
ENABLE_GEOFENCING
public static final java.lang.String ENABLE_GEOFENCING
- See Also:
- Constant Field Values
-
ENABLE_BIOMETRICS
public static final java.lang.String ENABLE_BIOMETRICS
- See Also:
- Constant Field Values
-
FACEBOOK
public static final java.lang.String FACEBOOK
- See Also:
- Constant Field Values
-
INSTAGRAM
public static final java.lang.String INSTAGRAM
- See Also:
- Constant Field Values
-
GOOGLE
public static final java.lang.String GOOGLE
- See Also:
- Constant Field Values
-
APPLE
public static final java.lang.String APPLE
- See Also:
- Constant Field Values
-
TWITTER
public static final java.lang.String TWITTER
- See Also:
- Constant Field Values
-
ASSERTION_VALUE
public static final java.lang.String ASSERTION_VALUE
- See Also:
- Constant Field Values
-
PASSWORD_VALUE
public static final java.lang.String PASSWORD_VALUE
- See Also:
- Constant Field Values
-
MEMBER_ATTRIBUTE
public static final java.lang.String MEMBER_ATTRIBUTE
- See Also:
- Constant Field Values
-
mBiometricsDialogManager
public BiometricsDialogManager mBiometricsDialogManager
-
mProgressDialog
protected android.app.ProgressDialog mProgressDialog
-
mAuthTask
protected CryptographyTask mAuthTask
-
mBiometricsAuthListener
protected AuthenticationCallback mBiometricsAuthListener
-
encrypting
protected boolean encrypting
-
mCipher
protected javax.crypto.Cipher mCipher
-
-
Method Detail
-
onLoginClick
protected void onLoginClick()
-
onForgotPasswordButtonClick
protected void onForgotPasswordButtonClick()
Method called when forgot password button is clicked
-
onLogoutButtonClick
protected void onLogoutButtonClick()
Method when logout button is clicked
-
onGoogleSignInButtonClick
protected void onGoogleSignInButtonClick()
Method when google plus button is clicked
-
onAboutAppClicked
protected void onAboutAppClicked()
Launch About App intent
-
getTwitterCallback
protected com.twitter.sdk.android.core.Callback<com.twitter.sdk.android.core.TwitterSession> getTwitterCallback()
Get Twitter callback to handle twitter actions- Returns:
- callback used to handle twitter actions
-
getFingerPrintListener
public RegisterBiometricsListener getFingerPrintListener()
Get Fingerprint listener- Returns:
RegisterBiometricsListener
fingerprint listener
-
setFingerPrintListener
public void setFingerPrintListener(RegisterBiometricsListener fingerPrintListener)
Set Fingerprint listener- Parameters:
fingerPrintListener
-RegisterBiometricsListener
-
getDecryptStringListener
public DecryptPasswordListener getDecryptStringListener()
Get decrypt string listener- Returns:
DecryptPasswordListener
-
setDecryptStringListener
public void setDecryptStringListener(DecryptPasswordListener decryptPasswordListener)
Set Decrypt String Listener- Parameters:
decryptPasswordListener
-DecryptPasswordListener
-
getGoogleSignInCallback
public GoogleSignInTaskCallback getGoogleSignInCallback()
Get google sign in callback- Returns:
GoogleSignInTaskCallback
callback
-
setGoogleSignInCallBack
public void setGoogleSignInCallBack(GoogleSignInTaskCallback googleSignInCallBack)
Set Google SignIn Callback- Parameters:
googleSignInCallBack
-GoogleSignInTaskCallback
callback
-
onCreate
public void onCreate(@Nullable android.os.Bundle savedInstanceState)
- Overrides:
onCreate
in classcom.cheetahdigital.uikit.architecture.mvp.MvpActivityView<V extends LoginView,P extends LoginPresenter<V>>
-
onStart
public void onStart()
- Overrides:
onStart
in classcom.cheetahdigital.uikit.application.BaseActivity
-
onPause
public void onPause()
- Overrides:
onPause
in classcom.cheetahdigital.uikit.application.ThemedActivity
-
onResume
public void onResume()
- Overrides:
onResume
in classcom.cheetahdigital.uikit.application.ThemedActivity
-
resetPasswordAndDeepLinkingCheck
public void resetPasswordAndDeepLinkingCheck()
Checks if the user is required to change its password and if there's a pending deep link intent.
-
showResetPassword
public void showResetPassword()
Redirects the app to the Reset Password Activity
-
initializeFacebookButtonLogin
protected void initializeFacebookButtonLogin()
Method to initialize facebook button login with default permissions (public_profile and email)
-
setupAppleLoginButton
protected void setupAppleLoginButton()
Sets up the callback for the Apple Login Button
-
getLoginButtonListener
public android.view.View.OnClickListener getLoginButtonListener()
Get login button listener- Returns:
View.OnClickListener
of login button
-
setLoginButtonListener
public void setLoginButtonListener(android.view.View.OnClickListener loginListener)
Set Login Button Listener- Parameters:
loginListener
-View.OnClickListener
listener
-
getForgotButtonClickListener
public android.view.View.OnClickListener getForgotButtonClickListener()
Get Forgot button listener- Returns:
View.OnClickListener
onForgotButtonClickListener
-
setForgotButtonClickListener
public void setForgotButtonClickListener(android.view.View.OnClickListener listener)
Set forgot button listener- Parameters:
listener
-View.OnClickListener
forgot button listener
-
getRegisterButtonClickListenerButton
public android.view.View.OnClickListener getRegisterButtonClickListenerButton()
Get Register button click listener- Returns:
View.OnClickListener
onRegisterButtonClickListener
-
setRegisterButtonClickListener
public void setRegisterButtonClickListener(android.view.View.OnClickListener listener)
Set Register button click listener- Parameters:
listener
-View.OnClickListener
register button listener
-
getLogoutButtonClickListenerButton
public android.view.View.OnClickListener getLogoutButtonClickListenerButton()
Get Logout button listener- Returns:
View.OnClickListener
onLogoutButtonClickListener
-
setLogoutButtonClickListener
public void setLogoutButtonClickListener(android.view.View.OnClickListener listener)
Set Logout Button Listener- Parameters:
listener
-View.OnClickListener
logout button listener
-
getGoogleSignInButtonClickListenerButton
public android.view.View.OnClickListener getGoogleSignInButtonClickListenerButton()
Get Google sign in button click listener- Returns:
View.OnClickListener
onGoogleSignInButtonClickListener
-
setGoogleSignInButtonClickListener
public void setGoogleSignInButtonClickListener(android.view.View.OnClickListener listener)
Set google sign in button click listener- Parameters:
listener
-View.OnClickListener
google sign in button click listener
-
getAboutAppButtonClickListenerButton
public android.view.View.OnClickListener getAboutAppButtonClickListenerButton()
Get about app button click listener- Returns:
View.OnClickListener
listener onAboutAppButtonClickListener
-
setAboutAppButtonClickListener
public void setAboutAppButtonClickListener(android.view.View.OnClickListener listener)
Set About app button click listener- Parameters:
listener
-View.OnClickListener
listener
-
showProgressDialog
public void showProgressDialog(boolean show)
Shows Progress Dialog if paramater is true- Specified by:
showProgressDialog
in interfaceLoginView
- Parameters:
show
- true to show dialog, else false
-
onLoginSuccess
public void onLoginSuccess()
Description copied from interface:LoginView
Callback after a successful login attempt.- Specified by:
onLoginSuccess
in interfaceLoginView
-
showLoginError
public void showLoginError(java.lang.String error, int errorCode)
Description copied from interface:LoginView
Callback after an unsuccessful login attempt.- Specified by:
showLoginError
in interfaceLoginView
- Parameters:
error
- Error texterrorCode
- Error code
-
receivedInfo
public void receivedInfo(java.util.Map<java.lang.String,java.lang.Object> data)
Description copied from interface:LoginView
Callback after a successful request for info api- Specified by:
receivedInfo
in interfaceLoginView
- Parameters:
data
- Model for the info
-
onConnected
public void onConnected(@Nullable android.os.Bundle bundle)
- Specified by:
onConnected
in interfacecom.google.android.gms.common.api.internal.ConnectionCallbacks
-
onConnectionSuspended
public void onConnectionSuspended(int i)
- Specified by:
onConnectionSuspended
in interfacecom.google.android.gms.common.api.internal.ConnectionCallbacks
-
onConnectionFailed
public void onConnectionFailed(@NonNull com.google.android.gms.common.ConnectionResult connectionResult)
- Specified by:
onConnectionFailed
in interfacecom.google.android.gms.common.api.internal.OnConnectionFailedListener
-
onActivityResult
public void onActivityResult(int requestCode, int resultCode, @Nullable android.content.Intent data)
- Overrides:
onActivityResult
in classandroidx.fragment.app.FragmentActivity
-
getScreenName
public int getScreenName()
Description copied from class:com.cheetahdigital.uikit.application.ThemedActivity
Returns the screen name to display.- Specified by:
getScreenName
in interfacecom.cheetahdigital.corekit.sdk.analytics.AnalyticsManager.AnalyticsScreen
- Overrides:
getScreenName
in classcom.cheetahdigital.uikit.application.ThemedActivity
- Returns:
- The screen name.
-
onCryptographySuccess
public void onCryptographySuccess(boolean forRegistration, @NonNull androidx.biometric.BiometricPrompt.CryptoObject cryptoObject)
Description copied from interface:CryptographyTaskListener
Implement method after successfully receiving {BiometricPrompt.CryptoObject
} from {CryptographyTask
}- Specified by:
onCryptographySuccess
in interfaceCryptographyTaskListener
- Parameters:
forRegistration
- is for registration or notcryptoObject
- {BiometricPrompt.CryptoObject
}
-
onCryptographyFailed
public void onCryptographyFailed(boolean forRegistration)
Description copied from interface:CryptographyTaskListener
Implement method after cryptography execution failed from {CryptographyTask
}- Specified by:
onCryptographyFailed
in interfaceCryptographyTaskListener
- Parameters:
forRegistration
- is for registration or not
-
getContentLayoutId
protected int getContentLayoutId()
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpActivityView
Provide the Content Layout ID which is of a Layout Resource Reference of Android- Specified by:
getContentLayoutId
in classcom.cheetahdigital.uikit.architecture.mvp.MvpActivityView<V extends LoginView,P extends LoginPresenter<V>>
- Returns:
- id of the content layout
-
createPresenter
protected P createPresenter()
Description copied from class:com.cheetahdigital.uikit.architecture.mvp.MvpActivityView
InstantiateMvpActivityView.mPresenter
to be used for thisMvpActivityView
- Specified by:
createPresenter
in classcom.cheetahdigital.uikit.architecture.mvp.MvpActivityView<V extends LoginView,P extends LoginPresenter<V>>
- Returns:
- the
MvpBasePresenter
-
onAccountPermissionGranted
public void onAccountPermissionGranted()
- Specified by:
onAccountPermissionGranted
in interfacecom.cheetahdigital.uikit.helper.permissions.AccountsPermissionHelper.AccountPermissionCallback
-
onAccountPermissionDenied
public void onAccountPermissionDenied()
- Specified by:
onAccountPermissionDenied
in interfacecom.cheetahdigital.uikit.helper.permissions.AccountsPermissionHelper.AccountPermissionCallback
-
onFacebookLoginSuccess
public void onFacebookLoginSuccess(com.facebook.login.LoginResult loginResult)
- Specified by:
onFacebookLoginSuccess
in interfacecom.cheetahdigital.uikit.helper.socialmedia.FacebookHelper.FacebookLoginCallBack
-
onFacebookLoginCancelled
public void onFacebookLoginCancelled()
- Specified by:
onFacebookLoginCancelled
in interfacecom.cheetahdigital.uikit.helper.socialmedia.FacebookHelper.FacebookLoginCallBack
-
onFacebookLoginError
public void onFacebookLoginError(com.facebook.FacebookException e)
- Specified by:
onFacebookLoginError
in interfacecom.cheetahdigital.uikit.helper.socialmedia.FacebookHelper.FacebookLoginCallBack
-
onLogin
public abstract void onLogin()
Abstract method which will be called when Login is successful. Ideally, you would start the MainActivity
from here.
-
onRegisterButtonClicked
public abstract void onRegisterButtonClicked()
Abstract method which will be called when Register Button is clicked. Ideally, you would start theRegistrationActivity
from here.
-
-