That's not what I was pointing out. Without going into much detail,
every MQTT client must have a separate client-id specific, or chaos and confusion
will quickly follow. Please take my word for it.
You are specifying a client-id in the mobile app but it is hardcoded. This
means that not only every device but also every connection in the app
will use the same client-id. This is pretty bad.
In addition, you don't provide the -i flag to mosquitto_pub and mosquitto_sub.
So they may end up using the same client id. Even if they don't, you rely on
their behaviour which — as far as I can see — is not incredibly well documented
and may change in the future.
The thing you should do before continuing investigating what's going on:
make ALL MQTT connections you create using any library/tool/etc
use a client-id that is explicitly provided and different from the other IDs.