11

This 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. The case I am looking for some app is much more frequent, usually processing the image, e.g. share from google camera to VSCO cam, or from VSCO cam to Instagram, Facebook, etc. Thus, app list must be shown first. But I see this contact list, I will very unlikely to use. I even doubt the contact in the rare ocassion of direct share will be in 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 funcionality. I just don't need this.

  • Check this question android.stackexchange.com/questions/128053/…, it seems the possibility to remove/edit direct share is not available yet. – user127476 Nov 27 '15 at 21:53
  • 1
    The answers on the linked question are certainly relevant to this question, but as that question is about removing individual contacts from the list, I don't think it's a duplicate. – Dan Hulme Jun 2 '16 at 21:39
  • Nothing? Not even some shell cmd? – REJH Jul 31 '16 at 8:48
  • There's an even easier way (if you know xml) and it doesn't require xposed; use Android's built in Intent Firewall (ifw) and block the Direct Share intent. It does require root. I've posted about it somewhere on SO, will look it up and add it here, too. – REJH Dec 8 '17 at 20:00
  • Just added the answer (well, a short descr + a link to the relevant answer :)) – REJH Dec 9 '17 at 13:47
4

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!

| improve this answer | |
  • Some blatant self-promotion: I've built (actually, updated) an app that replaces the Android Share dialog. I guess Andmade Share and AppChooser are fine alternatives, too, but I've tried to have it look and feel like the native share dialog. Try it here: sharedr.rejh.nl – REJH Jul 1 '18 at 7:56
1

This question has been on the unanswered list, surprisingly, while there is a solution available for rooted users with Xposed (tested on Marshmallow)

OP is looking for two requirements

  1. Removing contacts from Whatsapp, Gmail, Inbox etc appearing at the start of list

  2. Pushing the apps frequently used for direct share on top of the list

Both these can be done by CustomShare Xposed Module. Also available on Play Store

Developer discussion at XDA here

The module under Mode has two options - Open and Share. Using the share option we can select up to 9 apps (more requires donation version) to be blocked from appearing in the list. Pics below show the difference after blocking Gmail, Inbox and WhatsApp on my device ( When blocking WhatsApp, you do get a warning message that it can't be used for SMS but in my limited testing it had no impact )

enter image description here After Blocking

Coming to the second requirement of moving up the frequently used apps (which can be a big pain , considering practically every app registers itself as direct share)- . Under module settings Sort Order , untick Let Android sort the items and move the order of apps as desired. In the case below , Clipboard Pro, Chromer, and Cam Scanner have been given elevated visibility

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.