File tree 1 file changed +8
-3
lines changed
org.eclipse.paho.android.service/src/main/java/org/eclipse/paho/android/service
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1404,9 +1404,12 @@ private synchronized IMqttToken getMqttToken(Bundle data) {
1404
1404
}
1405
1405
1406
1406
/**
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
1410
1413
*
1411
1414
* @param notification notification to be used when MqttService runs in foreground mode
1412
1415
*/
@@ -1415,6 +1418,8 @@ public void setForegroundServiceNotification(Notification notification) {
1415
1418
}
1416
1419
1417
1420
/**
1421
+ * Sets ID of the foreground service notification.
1422
+ * If this method is not used then the default ID 1 will be used.
1418
1423
*
1419
1424
* @param id The identifier for foreground service notification
1420
1425
*/
You can’t perform that action at this time.
0 commit comments