ActivityNotFoundException, but setup is correct

I tripled-checked my setup on Square dashboard and my Android Java code. Everything is in place:

  • Giving a valid application-ID to PosClient
  • Android package name and SHA1 are set correctly
  • Latest production API version
  • ChargeRequest done with CAD and amount 100
  • POS app installed and logged in successfully
    But, whatever I do, I get ActivityNotFoundException when I do the ChargeRequest.
    What am I missing?

Hey there @claude, welcome to the forums! :wave:

Do you mind sharing the application ID (not your access token) that you’re using? Also, just to make sure we’re on the same page — are you getting this error while setting up an app using this guide for the Point of Sale API?

Try add this to AndroidManifest.xml

It’s a MUST after Android 11 when you want to start a 3rd party app’s activity.

Ops, the code got removed …

<queries>
    <package android:name="com.squareup" />
</queries>

This fixed it!
But what astonishes me, is that I am the first one to notice that since Android 11, following the instructions step-by-step, will not lead to a working integration?

Yeah, I think Square should add this to the step-by-step guide.

Thanks for providing that @groomore, and thanks for bringing this to our attention @claude! I pinged our documentation team about this, so they’ll take a look at the guide and make changes as needed.