MuntashirAkon/AppManager

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:

  1. On startup (handled via boot receiver)
  2. Custom interval (handled via WorkManager)
  3. Custom time ( " " " ) [If you want to execute now, use batch ops, 1-click ops, profiles etc.]
  4. After a network connection is available ( " " " )
  5. Battery not low ( " " " )
  6. Battery is charging ( " " " )
  7. * Device idle ( " " " )
  8. Storage not low ( " " " )
  9. After installing or removing an application (Constant foreground service)
  10. After an app is went to foreground ( " " " )
  11. After an app is went to background ( " " " )
  12. After screen goes on ( " " " )
  13. After screen goes off ( " " " )

* May not be implemented

Routine operations can be performed on the following options:

  1. Profiles
  2. Newly added package
  3. Newly removed package
  4. Changed packages (force-stopped, disabled, etc. there's no way to detect each operations individually)
  5. 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.

  1. 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.