Android logcat shows app "interaction:" "BLOCKED"

Viewed 488

I'm using Android Studio 2020.3.1 to watch debug messages for my app in the logcat. The app is a blank project made with Delphi 11.

Setting the logcat filter to com.bookup has these two lines appear:

2022-01-16 16:07:41.227 1247-1378/? I/AppsFilter: interaction: PackageSetting{138dd45 com.bookup.ThisIsMikesTestProjectOfDoom/10332} -> PackageSetting{3e91e66 com.paypal.android.p2pmobile/10229} BLOCKED
0222-01-16 16:08:02.394 1247-1378/? I/AppsFilter: interaction: PackageSetting{138dd45 com.bookup.ThisIsMikesTestProjectOfDoom/10332} -> PackageSetting{3e91e66 com.paypal.android.p2pmobile/10229} BLOCKED

The PayPal app is running on the Android device.

Am I correct in understanding these lines to say that my empty app tried to "interact" with the PayPal app and was "blocked?" Is that normal?

1 Answers

Your package doesn't seem to have the required visibility of PayPal package. You may need to add visibility for the required package in your app's Manifest.

Checkout for more info: https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9

Edit: My original answer did not give much context or examples, hence adding a few things which may help

Apps targeting API level 30 and above (Android 11+) need to specify which other packages they need to see (or use) on the device. For this, developers need to add a <queries> tag in their apps' AndroidManifest.xml like this:

<manifest package="com.bookup.ThisIsMikesTestProjectOfDoom">
  <queries>
    <package android:name="com.paypal.android.p2pmobile" />
    <package android:name="com.example.other.package" />
  </queries>
  …
</manifest>

The <package> tag is one of the valid tags under <queries>. Other options can be found here. Without the <queries> tag, AppsFilter will not allow access of any package to your app, which is what you're seeing in your logcat.

You can read more on the new changes in Package visibility here: https://developer.android.com/training/package-visibility/testing

Related