11

The Direct Share on Android 6 looks like this:

Direct share example, taken from http://stackoverflow.com/questions/30518321/on-android-m-how-to-configure-the-direct-share-capabilities-image-text-an

The problem is, I very rarely send something to contacts. It is much more frequent for me to look for some app, usually for processing the image, e.g. sharing from Google Camera to VSCO cam, or from VSCO cam to Instagram, Facebook, etc. Thus, the app list must be shown first. But I see this contact list that I will very unlikely use. I even doubt the contact in the rare occasion of direct share will be on the list.

This functionality also slows down the dialog, it takes quite a while for it to be shown.

So, the question is if there is any way to disable this functionality. I just don't need this.

Andrew T.
  • 16,898
  • 10
  • 77
  • 134

1 Answers1

6

If you are rooted but don't want to use Xposed you can use Android's native Intent Firewall to block direct share. This works on Android 6.0 all the way up to 8.1:

As answered earlier here: Removing contacts (aka “Direct Share”) from Share panel on Marshmallow

It turns out that - for rooted people - there is a way to completely turn off Direct Share!

In my search for a way to stop this stupid feature from bugging me I had a look at how the feature is actually implemented in apps by developers. It turns out that they register a service with an intent receiver (read: event listener) and when I realized that, I started looking for a way to block certain intents from broadcasting through the system. Well, Android actually has that built in. It's called the Intent Firewall. I quickly figured out how to create a rule for it to block apps from receiving the "Hey are there any apps that want to bug the user by putting a couple of Direct Share buttons under their thumb as they're about to tap something?"-event.

You just create a simple xml file like and drop this into it:

<rules>
  <service block="true" log="true">
    <intent-filter>
      <action name="android.service.chooser.ChooserTargetService" />
    </intent-filter>
  </service>
</rules>

Now you have to put it on the phone and copy it into the Intent Firewall directory. On most devices that would be

/data/system/ifw/

I simply used Root Explorer to copy the file there (no chmod required), tried to share something that caused Direct Share targets to pop up and BOOM! Nothing!

I recommend to do some background reading (see links above), especially about how the Intent Firewall works and how you can find the folder.

Happy not-sharing!

REJH
  • 351
  • 4
  • 10