Understandably, this is hard to digest and very much “ungooglable”.
Much head-desking on my end to make it work.
Sharing from an app is as easy as your first link, but follow the link from there some 3 levels deep:
Fill out the ShareAction object, and call the trigger function. (I assume you know this, but for completeness and other readers).
I don’t believe this part changed for 4.4, and this i believe should be easy enough to test yourself, or if you for some reason don’t have 4.4, ask someone (like me) to test. Or indeed go digging, but that sounds terrible.
Anyway, after that the transferengine takes charge and displays an overlay (now running out of process) with the relevant sharing methods for the supplied data. To this you can plug in sharing plugins if you want to provide a sharing method. And since recently this menu also include more regular mime-type and uri scheme based open-with functionality in that same list (primarily Android apps that registered “intents”, but also some stock ones).
It is here, in the plugins themselves (like my SeaPrint plugin), that apis/structure changed which i referred to above. A sharing plugin no longer consists of a TransferPlugin and it no longer has both PluginInfo and Uploader living with it in the same .so file.
Now there is SharingPlugin living with PluginInfo in one library, and optionally an associated TransferPlugin and Uploader in another .so library.
I don’t claim to fully understand the purposes and distinctions, but in my (ab)use i have SharingPlugin and SharingPluginInfo to register what mimetypes i handle and get my QML in the UI. Then TransferPlugin is where i get to run C++ code for “doing the thing”. In my case i just abuse this to call SeaPrint in a detached QProcess.
What i have here is just a poor-mans open-with, or mime type registration functionality that is really overly complicated.
So receiving a share action to an app is not just one thing…
However in the future (or arguably already) any share-to-app should just be a registration as mime/uri handler and some dbus method magic (see link by poetaster/answer by Karry).
Only fancy integrations like some stock apps, and things like qrshare should need to faff with sharing plugins ever again (wohoo!).