Hi,
For AppContext you can use
implicit lazy val
appCtx = AppContext(getApplicationContext)
Unfortunately, Macroid does not support anything other than
ActivityContext for creating GUI elements. So while it is
theoretically possible to use the service’s context with that
permission set, there is no way to construct an ActivityContext from
it.
The short-term solutions would be either to create a temporary
Activity and manipulate the GUI from there, or to use the native
API. The long-term solution — I guess — is to create the notion of
ServiceContext or somehow expand ActivityContext and overload w, l,
dialog, etc, to support that. Feel free to file an issue demanding
the latter approach :)
Nick