public class LineLoginApi
extends java.lang.Object
Usage
1. Start login.
Intent loginIntent = LineLoginApi.getLoginIntent(context, channelId);
startActivityForResult(loginIntent, REQUEST_CODE_LINE_LOGIN);
2. Handle the login result.
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode != REQUEST_CODE_LINE_LOGIN) {
return;
}
LineLoginResult result = LineLoginApi.getLoginResultFromIntent(data);
if (result.isSuccess()) {
// You can retrieve the LINE account information and the access token
// from LineLoginResult.
} else {
updateErrorUi();
}
}
| Modifier and Type | Method and Description |
|---|---|
static Intent |
getLoginIntent(Context context,
LineAuthenticationConfig config,
LineAuthenticationParams params) |
static Intent |
getLoginIntent(Context context,
java.lang.String channelId,
LineAuthenticationParams params)
Gets an intent for performing LINE Login.
|
static Intent |
getLoginIntentWithoutLineAppAuth(Context context,
java.lang.String channelId,
LineAuthenticationParams params)
Gets a login intent that only performs browser login.
|
static LineLoginResult |
getLoginResultFromIntent(Intent intent)
Gets a
LineLoginResult object from an Intent object. |
@NonNull
public static Intent getLoginIntent(@NonNull
Context context,
@NonNull
java.lang.String channelId,
@NonNull
LineAuthenticationParams params)
context - The Android context.channelId - The channel ID.params - LINE authentication related parameters.@NonNull
public static Intent getLoginIntentWithoutLineAppAuth(@NonNull
Context context,
@NonNull
java.lang.String channelId,
@NonNull
LineAuthenticationParams params)
context - The Android context.channelId - The channel ID.params - LINE authentication related parameters.@NonNull
public static Intent getLoginIntent(@NonNull
Context context,
@NonNull
LineAuthenticationConfig config,
@NonNull
LineAuthenticationParams params)
@NonNull public static LineLoginResult getLoginResultFromIntent(@Nullable Intent intent)
LineLoginResult object from an Intent object.intent - The intent.LineLoginResult object.