I’m working on a flutter application that protects copyrighted PDF materials and at first I used a watermark to cover the PDF screen but I noticed that it made the document barely readable so is there any way to detect if the user trying to take a photo from another phone?
I tried to use gyroscope and magnetometer sensors to detect another devices but there were no good results
No, there isn’t. It wouldn’t even be remotely possible. First off, you can’t detect a nearby phone if they don’t have something like NFC on. Secondly, the range of such communications is smaller than the range of taking a readable photo. Third, they could always use a non-phone camera. Or write it down with a paper and pencil. Or just remember it.
This issue is called the analog hole. There is no technical solution possible. If this is actually a concern, you need to only share this information in a secure location with security personnel present. Otherwise it’s the risk you take by existing in reality.