Android hotspot multiplayer

Hi!
I have a question?
When creating local multiplayer for android using hotspot.other android device won’t be able to find me.but when both Devices connected via a router
It work.What I need to do to make it work.like minimilitia or doodle army.