# Important notes related to using automatic communication
This page highlights important aspects for using automatic communication properly.
If you specify
autoClose = true for a scenario set, that set must not contain only scenarios that use the trigger
Such a scenario set will not run unless there is a notification, and the connection with the device will be cut off immediately.
However, you can register a scenario set which listens for notifications while other scenarios are running. For example, you can register a scenario set with
autoClose = true if it contains 1) a scenario with
trigger.type: "BLE_NOTIFICATION" scenario and
actions.type: "SLEEP" and 2) another scenario with
# Running LINE in the background
We have tested and verified that the automatic communication scenarios described here work when LINE is active (in the foreground).
However, they may work unexpectedly if LINE is running in the background, depending on the configuration of LINE and/or the smartphone.
Keep the following limitations and precautions in mind to maximize the chance that automatic communication will work as intended.
- Even if you follow the instructions in our documentation, we cannot guarantee that automatic communication will work as intended all of the time.
- If you go against the instructions in this documentation, it is likely that automatic communication will not work as intended.
- Future changes to the specifications of iOS and Android may cause automatic communication to not work as intended.
# When using
autoClose = false (recommended)
If you specify
autoClose = false in the scenario set parameters, the connection with the device is maintained.
After LINE discovers a device, it will stay connected as long as there is a signal.
In this situation, after the initial connection is established, you'll have to use
trigger.type: "BLE_NOTIFICATION" to trigger further actions.
Even if LINE is running in the background, it should be able to reconnect without problems on most smart devices and operating systems.
However, there may be a delay before the execution result is sent to your Webhook URL.
# When using
autoClose = true
If you specify
autoClose = true in a scenario set's parameters, LINE disconnects from the device when there are no more running scenarios.
LINE will reconnect after the time specified in
suppressionInterval has elapsed.
"Running scenario" means: a scenario in which an action is being executed or a scenario that was placed in the execution queue after being triggered. In other words, a scenario with
trigger.type: "BLE_NOTIFICATION" that is listening for a notification from the device is not a running scenario.
How LINE behaves after the time specified in
suppressionInterval elapses, strongly depends on the status of LINE and its iOS or Android execution environment. This is because iOS and Android greatly limit the operation of background apps. For example, when the screen is off or when LINE is running in the background, automatic communication may not work.
In particular, when LINE is in the background, you should not expect the scenario to be executed periodically at the time intervals you set in
suppressionInterval. There may also be a delay before the execution result is sent your Webhook URL.
# Limitations on
action.type: "SLEEP" scenarios
The time specified in
sleepMillis for the
action.type: "SLEEP" scenario should be 5 seconds or less.
Setting a time of 5 seconds or more may interrupt scenario execution when LINE is running in the background.
# Differences between iOS and Android
The working of automatic communication can be affected by aspects of iOS and Android.
The following information may become outdated as a result of future OS updates.
The below table explains how scenario execution is affected by the status of LINE and the display status of the screen.
|Exit status||-||Not executed|
The below table explains how scenario execution is affected by the status of LINE, the display status of the screen, and whether the smartphone is in Doze mode.
|LINE||Screen||Doze mode||Scenario execution|
|Exit status||-||-||Not executed|
|Background status||Off||Normal mode||Executed|
|Background status||Off||Doze mode|
There may be significant delays in the sending of execution results to Webhook URLs and the time to return from
In addition, behavior may differ between smartphone models.