Java Code Examples for com.linecorp.linesdk.auth.LineLoginApi#getLoginIntent()
The following examples show how to use
com.linecorp.linesdk.auth.LineLoginApi#getLoginIntent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SignInFragment.java From line-sdk-android with Apache License 2.0 | 6 votes |
@OnClick(R.id.sign_in_btn) @SuppressWarnings("unused") public void onSignInBtnClick() { try { Intent intent = LineLoginApi.getLoginIntent( getContext(), createLineAuthenticationConfigForTest(), createAuthenticationParamsForTest()); startActivityForResult(intent, REQUEST_CODE); addLog("Sign-in is started. [" + LOG_SEPARATOR + " channelId : " + channelId + LOG_SEPARATOR + "]"); } catch (Exception e) { addLog(e.toString()); } }
Example 2
Source File: LoginHandler.java From line-sdk-android with Apache License 2.0 | 5 votes |
@NonNull private Intent getLoginIntent( @NonNull Activity activity, boolean isLineAppAuthEnabled, @NonNull String channelId, @NonNull LineAuthenticationParams params ) { Intent intent; if (isLineAppAuthEnabled) { intent = LineLoginApi.getLoginIntent(activity, channelId, params); } else { intent = LineLoginApi.getLoginIntentWithoutLineAppAuth(activity, channelId, params); } return intent; }
Example 3
Source File: LineLogin.java From cordova-line-login-plugin with Apache License 2.0 | 5 votes |
private void login(CallbackContext callbackContext) { try { Intent loginIntent = LineLoginApi.getLoginIntent( this.cordova.getActivity().getApplicationContext(), channelId, new LineAuthenticationParams.Builder() .scopes(Arrays.asList(Scope.PROFILE, Scope.OPENID_CONNECT, Scope.OC_EMAIL)) .build() ); this.cordova.startActivityForResult((CordovaPlugin) this, loginIntent, REQUEST_CODE); } catch (Exception e) { this.UnknownError(e.toString()); } }