Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: For native app login, how to properly setup the redirection to my app #120

Open
GinoLin980 opened this issue Feb 16, 2025 · 4 comments

Comments

@GinoLin980
Copy link

I have a Flutter native app, when running on emulators, they were fine as they used internal browser to login.

But when I test my app on my own Android phone, which has native LINE, to login, it logged in seccessfully and did not pop to my app, it just stay in LINE native app.

Is there any guide or instructions specifying on deeplinking or callback or something on solving this?

@yxwandroid
Copy link

same question

@GinoLin980
Copy link
Author

@YkSix
Copy link
Contributor

YkSix commented Feb 24, 2025

Hi @GinoLin980 ,
Thanks for your report. As I couldn't reproduce this issue on my device (Galaxy Fold4, Android 14). I have a few questions regarding to it.

  1. Did this occur with the Flutter sample app located in this repository?
  2. Could you provide the following information: Android device, Android version, LINE App version (and try to upgrade to latest), Flutter LINE SDK version, and the targetSdkVersion of your app ?
  3. Did this occur in other Android devices or emulators? If so, please share the device/emulator's info.
  4. Could you download this app and test it to see if there are any login issues on it (using the same device as mentioned in this issue)? https://play.google.com/store/apps/details?id=com.linecorp.twshopping

I have a Flutter native app

Is it a public access app that I can download?

Thanks.

@GinoLin980
Copy link
Author

GinoLin980 commented Feb 24, 2025

Wow, it's late night for us to have discussion here.

  1. No, in the example app, it pops to the example app flawlessly on my actual device.
Android device: Galaxy S23+
Android version: Android 14, OneUI 6.1
LINE app version: 15.1.4 (latest)
Flutter LINE SDK version: 2.3.8
targetSdkVersion: minSdk = 24
                  targetSdk = flutter.targetSdkVersion
  1. In short, IDK. I don't have any extra actual devices around me, and I didn't try to login in native LINE on emulator since it might broke my chat history on my actual device if I'm not wrong.
  2. No issues.
  3. Still in development :(

Example code in my app
Edit: in my app, lineSignIn is called after several Navigator.push() (something like HomePage -> ProfilePage -> LoginPage, then a ElevatedButton calls lineSignIn) I don't know if this matters.

Future<dynamic> lineSignIn(context) async {
  Map<String, dynamic> data = {};
  try {
    final loginOption = LoginOption(false, 'normal'); // 設定登入選項
    final result = await LineSDK.instance.login(scopes: ['profile', 'openid', 'email'], option: loginOption); // 執行登入
...
}

Considered myself as a beginner on this SDK and Flutter ecosystem, I might have some improper setup.
Feel free to request more info.

As this is not a urgent case, just take it slow and have a great night.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants