Git Product home page Git Product logo

line-sdk-starter-android's Introduction

Important notice

This starter app is for LINE SDK version 3.x. Since these versions of SDK will be terminated on the end of June 2018, please use https://github.com/line/line-sdk-starter-android-v2.

For details, please refer https://developers.line.me/en/news/2018/02/28/.


LINE SDK starter application

This is a small toy app that exercises the LINE SDK login and profile APIs. It is meant to be a starting point for developers wishing to use these in their own application.

Before starting

To start integrating your service with LINE, register to become a LINE Partner (https://developers.line.me/requestform/input) and read the development guide (https://developers.line.me/android/overview).

Getting started

To build the app, first check out the repository.

$ git clone https://github.com/LINE/line-sdk-starter-android

Then set up the LINE SDK by copying SDK libraries and configuring your channel ID.

  • Copy the SDK jar file (e.g., line-android-sdk-3.1.13.jar) into app/libs
  • Copy the SDK native libs (e.g., armebi, x86) into app/src/main/jniLibs
  • Replace {{ ENTER YOUR CHANNEL ID }} with your channel id (from https://developers.line.me/channels/) in AndroidManifest.xml

Then open the directory in Android Studio and build and develop as you would any normal Android application.

LINE Android SDK API Docs: https://developers.line.me/android/api-reference

This application has been built with Android Studio 1.3. Previous versions should work but may require editing the build tools versions in build.gradle.

line-sdk-starter-android's People

Contributors

anuraaga avatar guitarsucks avatar kosukekamiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

line-sdk-starter-android's Issues

cause=jp.line.android.sdk.exception.LineSdkLoginException: error=FAILED_A2A_LOGIN, errorCode=2

cause=jp.line.android.sdk.exception.LineSdkLoginException: error=FAILED_A2A_LOGIN, errorCode=2

i try change Android Package Signature
myself keystore still occur FAILED_A2A_LOGIN
./android/debug.keystore still occur FAILED_A2A_LOGIN

and i add role
email address set official mailbox
and set LineID
Role is DEVELOPER

still occur FAILED_A2A_LOGIN,why?

please add more detail error description.

line sdk have so many warning.

this is build message.

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(jp.line.android.sdk.a) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(jp.line.android.sdk.a.a.a.b) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(jp.line.android.sdk.a.c.f) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(jp.line.android.sdk.a.c.c) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(jp.line.android.sdk.a.c.e) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is not an inner class.

Lineの認証画面から復帰した時に 「FAILED_A2A_LOGIN errorCode=2」

Line Login Platformにてログイン認証を実装する事になり、
「line-sdk-starter-android」のソースを参考にさせていただいています。

Lineの認証画面から復帰した時に以下のエラーが出て、ログインに失敗します。
FAILED_A2A_LOGIN errorCode=2

どういった原因が考えられますでしょうか?
以下は、該当するソースになります

LineAuthManager authManager = LineSdkContextManager.getSdkContext().getAuthManager();
authManager.login(this).addFutureListener(
new LineLoginFutureListener() {
@OverRide
public void loginComplete(LineLoginFuture future) {
Throwable cause = future.getCause();
if (cause instanceof LineSdkLoginException) {
android.util.Log.e(TAG, String.format("Error message: %s", cause.getMessage())); <- FAILED_A2A_LOGIN errorCode=2
}
}
});

Stay in the progressbar interface

Hello,
When I tune up the line client login, this time directly press the back button, will stay in the progressbar interface, will not automatically shut down.

An error occurred. Please try again.

I created the channel for our app, and entered the required technical information, when I try to login in the demo, it shows the error, and no any log. Could you help me?

		LineAuthManager authManager = LineSdkContextManager.getSdkContext().getAuthManager();
		authManager.login(this).addFutureListener(
				new LineLoginFutureListener() {
					@Override
					public void loginComplete(LineLoginFuture future) {
						switch (future.getProgress()) {
						case SUCCESS:
							SharedPreferences settings = getSharedPreferences("lineauth", MODE_PRIVATE);
							// Store credentials to, for example, send in a webview activity to a server.
							// Developers should not have to worry about these values if they are only calling
							// APIs from the Android application.
							settings.edit()
									.putString("mid", future.getAccessToken().mid)
									.putString("accesstoken", future.getAccessToken().accessToken)
									.putString("refreshtoken", future.getAccessToken().refreshToken)
									.putLong("expire", future.getAccessToken().expire)
									.apply();
							displayCroutonOnMainThread("Logged in!", Style.INFO);
							logger.info("Login success!");
							break;
						case CANCELED:
							displayCroutonOnMainThread("Don't cancel login!", Style.ALERT);
							logger.info("Login canceled!");
							break;
						default:
							displayCroutonOnMainThread("An error occurred. Please try again.", Style.ALERT);
							logger.info("Login error!");
							break;
						}
					}
				});

login always require authorization after change keystore

we changed our keystore setting in line developer website and our local build setting
before do that, our app only show line authorization once, and directly login later
after do that, our app show line authorization everytime login
we use line android sdk v1

How to send LINE message from Java code?

Now I am able to login LINE and display my username and profile picture when I click the "Try API" button. Next, I want to display my friend lists using apiclient.getFriends(). Any sample code?

Anyone knows how to create a Java API to send LINE message to friends?
I got the skeleton code but I do not know how to implement it.

class LineMsg {
    public void SendMsg(String username, String msg) {
        //username is the friend name that I want to send a message to
    }
}

Then I have a main method.

public void main(String[] args) {
    LineMsg linemsg = new LineMsg();
    linemsg.SendMsg("username of LINE friend","Hello World!")
}

Then I need to zip up as JAR file so my friend can import the JAR file and send LINE message to contacts. The purpose of doing this is to replace the SMS function which have high cost. So we want to send to our clients using the LINE method by Java code. If anyone knows how to implement, please give some ideas. Thanks.

I meet a login problem

when I try to login in by the sample codes from this project, I always meet
the same error message as below:
jp.line.android.sdk.exception.LineSdkLoginException: error=FAILED_WEB_LOGIN, errorCode=401

can u help to check it ?

FAILED_A2A_LOGIN

I have been logined successfully by web ,but failed by line app,I'm confused.

Login and Authorization form broken in android 5.*.*

I'm using LINE sdk to develop LINE login in RN app. When I tested in various devices, I found that in android 5 the login form appears to be broken, the page style isn't loaded and the buttons aren't working. Below is the screenshot of the broken page:

unnamed

In android other than 5 the login and authorization form works well. Is there any extra configuration for android 5? Any help is appreciated. 🙏

I met a login network error problem

device-2016-03-29-143718

I'm in China, i'm integrating with line, used a line login for our JP customers, but when i test line login, some phones are just doing fine, on Mi4 phone always met this problem(see screenshot above), please help me or give me some suggestion on this. thanks a lot!

Can't create new channel

line
When i login with my email and password, i got this error message. Could you tell me, how can i register my channel?

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.