Skip to content
AHOHNMYC edited this page May 17, 2022 · 1 revision

Лучше такое знать, чем не знать

Условие, Событие, Действие, Scenario, Сценарий, Связка

(прим. перев. Я долго думал, как всё это дело перевести на русский. То, что получилось мне нравится, хоть и весьма расходится с исходными английскими словами. Все слова есть в глоссарии и используются в русском переводе)

В Easer эти слова имеют следующее значение:

  • Условие
    • Долго сохраняет состояние
    • Есть события начала и конца выполнения
  • Событие
    • Кратковременное (моментальное) "событие"
  • Действие
    • Что-то, что может сделать Easer
  • Scenario
    • Историческое название для предопределённого События
  • Сценарий
    • Набор Действий
  • Связка
    • Связывает Событие/Условие и Сценарий, который исполнится при наступлении события/выполнении условия

От Событий к Событиям+Условиям

Сейчас Easer в переходном состоянии (подробности в #86). Для обратной совместимости все События оставлены как есть.

Если искомое есть и в Событиях и в Условиях, надо выбирать Условие (и соответсвуюший ConditionEvent). The only exception is when you seriously need an Event (short-time effect) rather than a Condition (continous state).

Hackey functionalities

Some functionalities doesn't have official APIs so Easer uses some workarounds (reflection) to achieve that. However, they are unreliable and may not work on some devices; enabling root features will usually benefit these functions. Here is a list of these functionalities:

Functionality Class Non-root compatibility Root-feature compatible?
Turn mobile data (cellular data) on/off CellularOperationPlugin Maybe Yes
Turn hotspot (wireless AP) on/off HotspotOperationPlugin Maybe Not yet
Execute commands CommandOperationPlugin Probably not (it's said executing commands requires root permission, or it would faild) Yes

It is very welcomed to report compatibility situation on different devices and/or ROMs.

Functionality Explained

Currently, the UI of Easer is not pretty and needs a lot of improvements; some behaviors may not exactly follow your mind. They are listed here.

  • Easer will use relevant system permissions to check events and change settings. Although there is runtime permission check, please do not REVOKE the permissions granted to Easer (or the relevant functions won't run correctly).
  • Changing brightness will start a transparent screen (Activity) for a very short period (and it will finish itself automatically), which may affect the work or game you are current doing. This is due to the fact that there is no "official" way to change the brightness from a background service.
  • Time (TimeEventPlugin) uses Android's system level notification mechanism (AlarmManager), which is inexact (from Android 4.4) to minimize wakeups and battery use as said in the official document. My observation of the maximum shift is 3 minutes.
  • Similarly, Date (DateEventPlugin) also uses AlarmManager so it may also be inexact (though this behavior is relatively less harmful because 3 minutes is only a small portion compared to a day).
  • Before and After (EventType) are inclusive (not sure if it will be useful to have them exclusive).
  • Most events won't be re-triggered if it is already satisfied and hasn't become unsatisfied yet. That said, you won't need to worry about creating an "after 3:00pm" event and it repeats triggering all the time. The small amount of re-triggerable events are designed to be so because of their natural property, so users won't need to worry about that -- just follow what you feel to use them.

Permission

See here for the full explaination.