Routine Operations
MuntashirAkon opened this issue · 5 comments
It's important to add a feature that lets users execute various operations in a definite moment or event. These events are:
- On startup (handled via boot receiver)
- Custom interval (handled via WorkManager)
- Custom time ( " " " ) [If you want to execute now, use batch ops, 1-click ops, profiles etc.]
- After a network connection is available ( " " " )
- Battery not low ( " " " )
- Battery is charging ( " " " )
- * Device idle ( " " " )
- Storage not low ( " " " )
- After installing or removing an application (Constant foreground service)
- After an app is went to foreground ( " " " )
- After an app is went to background ( " " " )
- After screen goes on ( " " " )
- After screen goes off ( " " " )
* May not be implemented
Routine operations can be performed on the following options:
- Profiles
- Newly added package
- Newly removed package
- Changed packages (force-stopped, disabled, etc. there's no way to detect each operations individually)
- Running user apps
2-5 also require a profile but the packages within the profile will be ignored. I may add an option for it in profiles later.
Prerequisite: Profiles (#72)
Routine operations are best suited if they each have a separate profile. For instance, a user may want to disable a bunch of apps for a certain interval or immediately for that matter. Having profiles can help him achieving that easily. Features of a profile:
- Each profile must have a unique name
- Profile can contain all the features that AM supports including app/component disabling, app op blocking, permission revoking, force stopping and backups
- Profile can be easily imported, exported and duplicated
- Features that supports blocking/denying should have to states: on (blocking is in place) and off (blocking is disabled).
How is profiles going to be merged with routine ops
All routines are considered separate events: some are built-in (such as on reboot, on install, on uninstall, etc.) and some are user-defined (such as custom interval), and each event can be assigned multiple profiles. So, when an event is called, the operations stated in the profile will be executed.
Routine tasks profiles should also support shortcuts so that they can be triggered manually from the home screen.
- After installing...
Prompt to restore data in the notification, if available.
Prompt to restore data in the notification, if available.
This should go in the settings page related to backup/restore, I think.