Is it possible to dynamically define aspects of the AndroidManifest.xml? For example, is it possible to register or edit the definition of activities, services and receivers on the fly, using Java code?
If so, are there any limitations on where this code should be placed? What else can be dynamically defined?
I believe most of the available operations are described by the PackageManager documentation
You can add and remove permissions (addPermission()) and you can enable or disable components (services, receivers etc.) with setComponentEnabledSetting().