From b7ce5e378e835621ec881c9a81573e797df61238 Mon Sep 17 00:00:00 2001 From: MGasztold Date: Tue, 7 Jul 2020 16:23:42 +0200 Subject: [PATCH] Improve comments Signed-off-by: MGasztold --- .../paho/android/service/MqttAndroidClient.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttAndroidClient.java b/org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttAndroidClient.java index d07033f3..fb087af6 100755 --- a/org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttAndroidClient.java +++ b/org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttAndroidClient.java @@ -1404,9 +1404,12 @@ private synchronized IMqttToken getMqttToken(Bundle data) { } /** - * If foregroundServiceNotification is not null at the time of - * MqttService start it will run in foreground mode. This method has no effect if - * Build.VERSION.SDK_INT < Build.VERSION_CODES.O + * Sets foregroundServiceNotification object. If it is not null at the time of + * MqttService start then the service will run in foreground mode which is + * mandatory to keep MQTT service operation when app is + * in the background on Android version >=8. + * + * This method has no effect if Build.VERSION.SDK_INT < Build.VERSION_CODES.O * * @param notification notification to be used when MqttService runs in foreground mode */ @@ -1415,6 +1418,8 @@ public void setForegroundServiceNotification(Notification notification) { } /** + * Sets ID of the foreground service notification. + * If this method is not used then the default ID 1 will be used. * * @param id The identifier for foreground service notification */