Why WhatsApp is suddenly unable to open any APK shared by users? As of 13-11-18, I was sharing APK files on WhatsApp, for testing apps within a circle of people, with no problem whatsoever. But as of today, if I try to open an apk, I get an error toast saying:


  You may not have the proper app to view this content. 


Did they change their policies and decided not to let people share APK files on their platform?

I don't use third party websites for sharing APKs, where mostly Chrome spooks most people saying that "This type of file may harm your device".
Well as per my understanding this is how files are opened from WhatsApp making use of file extensions:


File type is determined from extension (getMimeTypeFromExtension) and intent.action.VIEW is launched provided with file path dat= and file type typ=.
If the file extension is not known, file is treated as octet-stream mime type. 
List of preferred apps (/data/system/users/0/package-restrictions.xml which is built from user selected defaults and files at /system/etc/preferred-apps/*.xml) is checked for activities that can handle this file type.
If there is only one app that can handle this mime type, that app (activity) is launched. You can see which app handles what mime type by:  

dumpsys package preferred-xml


Use adb shell or one of permission.DUMP or root is required.
If there are multiple apps (more than one matching activity for the given intent) available and no preferred app is already set, ResolverActivity (from Android framework resources) is launched (not intent.action.CHOOSER) showing a dialog to select app (for Once or Always).
If the file type is apk (typ=application/vnd.android.package-archive) and PackageInstaller is set to handle this file, action.INSTALL_PACKAGE is invoked.
Now if Android version is Oreo or above and WhatsApp is updated, it would need permission.REQUEST_INSTALL_PACKAGES to install unknown package. Once granted, app will be installed.


You can use logcat to view how this whole process goes on. Use adb shell or one of permission.READ_LOGS or root is required. You can share results here to help me and others understand where the chain breaks.

Workaround:
Make sure that files are sent and received with correct extension i.e. .apk. If WhatsApp is unable to handle downloaded apk file for any reason, use a File Manager. Explore to /sdcard/WhatsApp/Media/WhatsApp Documents and install apk file.

RELATED: Alternative “File Open” (not stack “DocumentsUi”) for WhatsApp?