Is there any way to detect a screenshot taken in android and ios apps?

I am trying to know if there is a way to detect if screenshot has been taken like in snapchat and instagram?
Thank you:)

As far as I know, it is not possible to do directly from Unity/scripts.