# Trying the starter app

The LINE Login starter app for Android lets you quickly see how LINE Login works on an Android app.

# Prerequisites

To build and run the starter app, you need:

# Trying the starter app with the predefined sample channel

To try the starter app with our sample channel, follow the steps below.

  1. Clone the LINE SDK for Android open-source repository (opens new window).

    $ git clone https://github.com/line/line-sdk-android.git
  2. Open the LINE SDK project in Android Studio.

  3. Build the project and run the app using an Android device or Android Emulator.

The "Channel ID" field in the main screen is populated with the starter app's sample channel ID, 1620019587.

# Trying the starter app with your own channel

You can also link the starter app to your own channel. If you don't have a channel, you can create one in the LINE Developers Console. This also requires selecting or creating a provider.

After creating a channel, link the starter app to it by doing these things:

  • In the LINE Developers Console, configure your channel as described in Linking your app to your channel.
  • In your Android project, change the Android package name to the name configured in your channel.
  • In the main screen of the starter app, enter your channel ID.

You can save up to three channel IDs in the starter app. Select one of the "Settings save slot" radio buttons and tap the "Save" button in the main screen.

Android app settings screen showing options to enter and save a channel ID to a save slot.

# Running the starter app

Run the starter app using an Android device or Android Emulator. When you first log in, you must agree to let the app access your profile information.

# Using the "Log in with LINE" button

Tap the green "Log in with LINE" button to log in using app-to-app login. This is the LINE SDK's built-in login button.

If LINE is installed on the device and you are logged in, you will be able to log in to the starter app automatically without entering your LINE credentials. Otherwise, you'll be requested to log in by using your device's browser. In this scenario, you'll need to enter your LINE credentials.

# Using the "Sign-in" button

Tap the "Sign-in" button to log in with the bot prompt option and Scopes specified. The login result appears in the lower half of the screen.

# Trying out the features available on the LINE SDK

Once you have logged in to the app, you can tap the APIs button to try out the following features of the LINE SDK.

  • Log out the user
  • Refresh the access token
  • Verify the access token
  • Get the current access token
  • Get the user profile