When Android app Closed how to get messages because connection is lost when App is closed

I am currently using HIVEMQTT protocol in my android app and I am able to receive messages when my app is open or when it is running in the background however when i close my app completely the connection is lost and I am not longer able to receive messages. I need to be able to still recieve messages as I want the message to trigger an activity in my app to launch.