/** * Create intent to launch OAuthActivity using information from the given session. * * @param context context * @param session the BoxSession to use to get parameters required to authenticate via this * activity. * @param loginViaBoxApp Whether login should be handled by the installed box android app. Set * this to true only when you are sure or want to make sure user installed box android app and * want to use box android app to login. * @return intent to launch OAuthActivity. */ public static Intent createOAuthActivityIntent( final Context context, BoxSession session, boolean loginViaBoxApp) { Intent intent = createOAuthActivityIntent( context, session.getClientId(), session.getClientSecret(), session.getRedirectUrl(), loginViaBoxApp); intent.putExtra(EXTRA_SESSION, session); if (!SdkUtils.isEmptyString(session.getUserId())) { intent.putExtra(EXTRA_USER_ID_RESTRICTION, session.getUserId()); } return intent; }