PUN working in editor but not when built as APK

Hello Photon people, I was creating an online mobile game using Photon and it works in Unity editor. When I say it works I mean someone can create a room and more people can join it but when I build it as APK, the client using it could not either join or create a room. also some of the UIs doesn't show. It's kind of weird that it works fine in the editor but not in my phone. I hope for anyone's response. Thank you!