So the issue was that have been setting Intent type and data in two separate method calls..
What I didn't know is that Intent.setType()
clears its data and Intent.setData()
clears its type..
When I set both data and type through the Intent.setDataAndType()
method call, it works even for URI pointing to a stream.
Unfortunately the final implementation is still not working flawlessly everywhere. It works in default android gallery app, in G+ Photos app, in QuickPic, in Sony gallery app, but it does not work in default HTC gallery neither in default Samsung gallery. Its just a pity, that its actually not that much dependent on my implementation as on how is it implemented in the 3rd party viewer app.