Sometimes, app encounters ActivityNotfoundException when trying to login by installed LINE app.
LineApiError{httpResponseCode=-1, message='android.content.ActivityNotFoundException: No Activity found to handle Intent
{ act=android.intent.action.VIEW dat=https://access.line.me/... pkg=jp.naver.line.android }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1805)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1514)
at android.app.Activity.startActivityForResult(Activity.java:3950)
at android.app.Activity.startActivityForResult(Activity.java:3911)
at android.app.Activity.startActivity(Activity.java:4234)
at com.linecorp.linesdk.auth.internal.LineAuthenticationController$RequestTokenRequestTask.onPostExecute()
...
Solution
Check if system has component to handle the intent before passing out the created intent.
Issue
Sometimes, app encounters ActivityNotfoundException when trying to login by installed LINE app.
Solution
Check if system has component to handle the intent before passing out the created intent.