Skip to content

line/line-sdk-starter-android-v2

Repository files navigation

line-android-v2-starter

LINE Android SDK V2 starter

Introduction

This is a sample application for LINE Android SDK V2. It demonstrates the following functionality:

  • App-to-app Login
  • Web Login
  • GetProfile API
  • Verify Token API
  • Refresh Token API
  • Logout API

Before Starting

  • You must have Android Studio installed.
  • You must create a LINE Login account on the LINE Business Center that has the application type set to NATIVE_APP. You will need the account's Channel ID to set up the SDK.

Setup

  1. Download the SDK aar file (line-sdk-x.x.x) from the LINE Developer Console and put it into the app/libs folder.
  2. Set the CHANNEL_ID constant in Constants.java to your Channel ID and then open the project in Android Studio and build it as you would with any normal Android application.

How to Use

The Login with LINE button will use the LINE App to log in and the Browser Login button will open a Web Login screen inside of a Chrome custom tab.

After logging in, the user's profile information and access token will be displayed on the screen in addition four buttons:

  • GET PROFILE - Pushing this button will call the LINE SDK's getProfile() method. The profile information retrieved from the API will appear in a Popup Dialog. This information should be the same as the profile information that is initially displayed to the user after they log into this starter application.
  • VERIFY TOKEN - Pushing this button will call the LINE SDK's verifyToken() method. A will appear informing the user if their token is valid or not.
  • REFRESH TOKEN - Pushing this button will call the LINE SDK's refreshAccessToken() method. This will update the access token that is displayed on the starter app's main screen.
  • LOGOUT - Pushing this button will call the LINE SDK's logout() method. This will revoke the access token and return the user to the "Select Login" page.

Documentation

For detailed documentation, please refer to these links:

About

A starter application that demonstrates how to use LINE SDK V2 for Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages