Alternative "File Open" (not stack "DocumentsUi") for WhatsApp? DocumentsUI, the AOSP standard "file manager" is quite buggy here (I use Lineage 15.1), especially in the context of multi-user and work profile (meaning it does not show files for other users then the main user and is hence not usable).

For "simple" file browsing, I therefore substituted DocumentsUI app (com.android.documentsui) with com.simplemobiletools.filemanager.pro which works much better.

My issue and the core of the question is, that the glorious "facebook" WhatsApp Manager when attempting to attach files, resorts to opening the intent specifically for com.android.documentsui and fails even to open com.simplemobiletools.filemanager.pro even in the case that it is the only filemanager still installed. Hence I cannot attach files in other users in Whatsapp, due to the buggy DocumentsUI and WhatsApp not being willing/capable/well-enough-designed to make a general "FileOpen" intent, instead of referring directly to com.android.documentsui 

I understand that WhatsApp is particularly made very little IT-able persons, who do not care about privacy very much, therefore it is clear that the WhatApp is not geared to allow/accomodate for educated and more able users which might desire to use not the standard com.android.documentsui.

An answer to this question would be to provide an insight which com.android.documentsui would be able to integrate well with WhatsApp Messenger
May be this is not exactly the answer to you question because I don't have any of your version of Android and WhatsApp to test. But on my Pie ROM with WhatsApp v2.19.53, I can pick attachments with any File Manager that registers one of its activities as a preferred activity for some implicit intent action; android.intent.action.OPEN_DOCUMENT in our case. I use MiXplorer, so:

# /data/system/users/0/package-restrictions.xml

[...]
&lt;preferred-activities&gt;
    [...]
    &lt;item name="com.mixplorer/.activities.BrowseActivity" match="600000" always="false" set="0"&gt;
        &lt;filter&gt;
            &lt;action name="android.intent.action.OPEN_DOCUMENT" /&gt;
            &lt;cat name="android.intent.category.OPENABLE" /&gt;
            &lt;cat name="android.intent.category.DEFAULT" /&gt;
            &lt;type name="*/*" /&gt;
        &lt;/filter&gt;
    &lt;/item&gt;
    [...]
    &lt;item name="com.android.documentsui/.picker.PickActivity" match="600000" always="false" set="0"&gt;
        &lt;filter&gt;
            &lt;action name="android.intent.action.OPEN_DOCUMENT" /&gt;
            &lt;cat name="android.intent.category.OPENABLE" /&gt;
            &lt;cat name="android.intent.category.DEFAULT" /&gt;
            &lt;type name="*/*" /&gt;
        &lt;/filter&gt;
    &lt;/item&gt;
    [...]
&lt;/preferred-activities&gt;
[...]


When I tap on attachment icon in WhatsApp, it opens WhatsApp's own DocumentPickerActivity from where I can pick files:

ActivityManager: {cmp=com.whatsapp/.DocumentPickerActivity (has extras)}


Or I can opt to choose some other File Manager by tapping Browse other docs on top. This way Android's internal resolver goes through configurations and opens up available options for me:

ActivityManager: {act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=*/* cmp=android/com.android.internal.app.ResolverActivity (has extras)}


To pick attachment, I can choose MiXplorer app:

ActivityManager: {act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=*/* cmp=com.mixplorer/.activities.BrowseActivity (has extras)}


Or Files / DocumentsUI app:

ActivityManager: {act=android.intent.action.OPEN_DOCUMENT cat=[android.intent.category.OPENABLE] typ=*/* cmp=com.android.documentsui/.picker.PickActivity (has extras)}


First thing to check is if Files / DocumentsUI app is not set as default app (always="true"):

# /data/system/users/0/package-restrictions.xml

[...]
&lt;preferred-activities&gt;
    [...]
    &lt;item name="com.android.documentsui/.picker.PickActivity" match="600000" always="true" set="2"&gt;
    [...]
&lt;/preferred-activities&gt;
[...]


If this is the case you need to reset its defaults (App info > Open by default > Clear defaults).

You can also try with a different File Explorer app and different WhatsApp version to test if it works. I'm not sure if there are any changes in implementation of com.android.internal.app.ResolverActivity across AOSP updates, so consider updating Android version if possible.

RELATED: Why WhatsApp is suddenly unable to open any APK shared by users?