Skip to content

Commit 1a60744

Browse files
committed
Improve comments
Signed-off-by: MGasztold <[email protected]>
1 parent a765c09 commit 1a60744

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service/MqttAndroidClient.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -1404,9 +1404,12 @@ private synchronized IMqttToken getMqttToken(Bundle data) {
14041404
}
14051405

14061406
/**
1407-
* If foregroundServiceNotification is not null at the time of
1408-
* MqttService start it will run in foreground mode. This method has no effect if
1409-
* Build.VERSION.SDK_INT < Build.VERSION_CODES.O
1407+
* Sets foregroundServiceNotification object. If it is not null at the time of
1408+
* MqttService start then the service will run in foreground mode which is
1409+
* mandatory to keep MQTT service operation when app is
1410+
* in the background on Android version >=8.
1411+
*
1412+
* This method has no effect if Build.VERSION.SDK_INT < Build.VERSION_CODES.O
14101413
*
14111414
* @param notification notification to be used when MqttService runs in foreground mode
14121415
*/
@@ -1415,6 +1418,8 @@ public void setForegroundServiceNotification(Notification notification) {
14151418
}
14161419

14171420
/**
1421+
* Sets ID of the foreground service notification.
1422+
* If this method is not used then the default ID 1 will be used.
14181423
*
14191424
* @param id The identifier for foreground service notification
14201425
*/

0 commit comments

Comments
 (0)