Social Distancing for Apps

With Android 11, this is no longer the case.

Suppose, as in the latter example above, you have written two apps. The user assures you that both apps are installed. With Android 11, by default, you have no means of verifying from one app that the other app is installed. And, with Android 11, by default you will not be able to communicate between those apps. In the case from above, the client app cannot bind to the service app, even with a properly-constructed Intent.

(How does the author know this? The author beat his head against a wall for an hour trying to figure out why the sample wouldn’t run, before remembering this new restriction…)

There are ways to whitelist certain things that will allow your app to see other apps. And there is an option to eliminate this restriction entirely. However, as you will see, neither are complete solutions — you should assume that the original forms of interoperability available to Android apps before will not be available to you going forward.

Also note that there are a number of other built-in limits on this restriction:


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.