I did not find any docs for this, all I can find is examples and some posts here.
My deductions are following:
(:background)
Used to annotate a class. It says that the class is known and accessible in background as well.
(:background_method)
Used to annotate a function that is known and accessible in background
Is this true so far?
Questions:
- Do I need to annotate ANY function inside a class with the (:background_method) annotation if it is used in the background? Additionally, is the (:background_method) annotation only valid inside a class annotated with (:background)?
- How can I access static const fields in the background? I added an example code below which does not work (accessing both fields from the background result in "Error: Illegal Access (Out of Bounds) Details: Failed invoking <symbol>" error...
(:background) class Constants { static const PROP_PENDING_WEB_REQUEST = "PendingWebRequests"; (:background) static const PROP_PENDING_WEB_REQUEST2 = "PendingWebRequests"; }