SendMessageFromActivityToService You can send object from Activiy to Service with EventBus when click button and server is running For more information https://github.com/greenrobot/EventBus