Is it possible to have an app that can send data automatically to another phone?.

Example being, I have a game say snap on my phone and someone I dont know has same game on phone. when they get in close proximity the play gets sent back and forth without user touching the phone or accepting file etc? So basically it is set to bypass the normal data transfer protocols but securely sends and receives data.