I need MQTT broker to publish the received MQTT message from the Android client to all other clients so added mosquitto pub command in the body of the message.
publish(client,"mosquitto_pub -h 192.34.63.138 -t fromApp -m "Turn" -d ");
It is giving error that "Can't resolve symbol "Turn" and ; or ) expected" .
Update
I understood it correctly later. I actually needed an MQTT message from the android client to be sent to all other clients so I thought to include publish keyword in the message body which was quite wrong. The MQTT itself sends the received messages to all the clients provided if the clients have subscribed to that topic.Hopefully, it will help other readers.