androidkotlinandroid-manifestqr-codeintentfilter

Android - Cann't open QR link with my app


I want to open QR link with my app (from camera).

I checked link and its correct,

I tried asking AI's - nothing from them too :D

Can somone help me out what can be reason for this error?

Edit: "the error i'm getting is on pixel 4, but others tried on pixel 6 and it works..."

here is manifest snippet:

<activity
  android:name=".ui.activities.LauncherActivity"
  android:exported="true"
  android:label="@string/application_name"
  android:noHistory="true"
  android:screenOrientation="portrait"
  android:theme="@style/BlackStatusBarColor">
    <intent-filter>
      <action android:name="android.intent.action.MAIN" />
      <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data
      android:name="android.app.shortcuts"
      android:resource="@xml/shortcuts" />
    <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="https" />
      <data android:host="/* correct link here, I double checked it */" />
    </intent-filter>
 </activity>

and here is error i'm getting:

Activity not found to handle Intent action [CONTEXT service_id=77 ]
android.content.ActivityNotFoundException: Unable to find explicit activity class {...ui.activities.LauncherActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2158)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805)
at android.app.Activity.startActivityForResult(Activity.java:5470)
at hsz.platform_startActivityForResult(:com.google.android.gms@232414044@23.24.14 (190400-544099984):2)
....

Solution

  • adding

    android:autoVerify="true"
    

    solved the issue for me.