Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Android Paho client on Andriod OS 8 (Oreo) issue

Hi Kostas,
I've just tried running the Android Sample Application on Android 8.1 and wasn't able to recreate this issue, though this could be because the sample application is quite basic. It might be worth checking on Stack Overflow as well where there will be more general Android experts who may be able to help.
Kind regards,
James Sutton
Software Engineer - IoT Foundation - MQTT Open Source Projects
Ops Team - Wimbledon Project

Phone: 01962 815438 | Extension: x372454
Personal Website:
Find me on:     

Hursley Park
United Kingdom
IBM United Kingdom Limited Registered in England and Wales with number 741598 Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU
----- Original message -----
From: Kostas Kalogirou <kalgik@xxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Subject: [paho-dev] Android Paho client on Andriod OS 8 (Oreo) issue
Date: Mon, Jul 23, 2018 7:34 PM

Dear all,

I am using the library org.eclipse.paho.client ( to implement a simple Android MQTT client which connects to our MQTT server.


My Android MQTT client application worked properly until Android OS 7.x.  Unfortunately, it is not working properly for Android 8 (Oreo version). Specifically, I received the following exceptions:


· has leaked ServiceConnection$MyServiceConnection@4058b04 that was originally bound here


· Service has leaked IntentReceiver$AlarmReceiver@b9978a0 that was originally registered here. Are you missing a call to unregisterReceiver()?


·         java.lang.IllegalStateException: Not allowed to start service Intent { cmp= }: app is in background uid UidRecord {61f9870 …………………}


I followed the recommendations from Google for Androdi 8.0 ( and ) , so I changed my class to extend JobIntentService and use the enqueueWork().

In the MainActivity’s onCreate()  I am calling the JobIntentService as following:


Intent intentService = new Intent(MainActivity.this, SimpleJobIntentService.class);
"label", intentService.toString());

this, intentService);

new Intent(this, SimpleJobIntentService.class));
else {
new Intent(this, SimpleJobIntentService.class));


where the SimpleJobIntentService is calling the MQTT connection (MqttConnectOptions)

I am using the paho library in

 implementation('') {

        exclude module: 'support-v4'



I would like to ask you if there is any solution to this problem or if there is any newer version which is compliant with Android OS 8 (Oreo).




paho-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Back to the top