Paho MQTT Android service wake up activity

后端 未结 5 1999
独厮守ぢ
独厮守ぢ 2021-01-02 14:36

I am trying to use Paho Android MQTT library (downloaded from here). The sample service application works fine, the subscribe and the publish meth

5条回答
  •  半阙折子戏
    2021-01-02 14:59

    As far as I understand the topic Paho brings all you need. In my application the paho mqtt-service never stops until I want it. I registered the Paho-service in the manifest to Android with the following snippet.

    ‹!-- Mqtt Service --›
    ‹service android:name="com.ibm.android.service.MqttService" /›
    

    This should do the trick.

    More information in the description of http://www.eclipse.org/paho/files/android-javadoc/index.html

提交回复
热议问题