Giter VIP home page Giter VIP logo

line-sdk-starter-android-v2's Introduction

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 APP2APP LOGIN button will use the LINE App to log in and the WEBLOGIN 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:

line-sdk-starter-android-v2's People

Contributors

mrmaakun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.