I have been looking for this for a long time, but at the moment, nothing really works.
You can search for cheapcast, an application that will emulate chromecast, but it has been removed from the market due to incompatibility issues ...
Link to the official XDA stream
I also heard about a project of an emulator written in python for raspberry Pi, which seemed to work, but the project seems to be inhibited since then. [UPDATE] Dev wrote on the project page that he was going to publish a new version.
Link to github pic
Anyway, I can find documentation on how to create applications that transmit, but nothing about open sdk for the recipient. It is still closed.
source share