Importing classes or packages

Is there a way for a SmartApp to import a groovy class or package?

I noticed that there are certain patterns or snippets of code that show up in my apps over and over, again. For example, the code to determine “darkness” based on the current time relative to local sunset and sunrise times.

To cut down on code duplication and all the nasty side effects that come with it, it would be great to have that sort of functionality.

1 Like