Itoo X is a framework that creates a virtual App Inventor environment for background execution. It is the framework that powers Itoo. Today I'm announcing to make the framework open-source for general use.
By adding the framework into your extension, you would be able to leverage the power of background execution same as Itoo.
An example:
If you are making an extension for Pedometer sensor, you could make the user created blocks come into action by background execution offered by Itoo X
Github
Itoo X is open source and is published under the GPL V3 License
Adding Itoo X
If you decide to use the Itoo extension with your project, then add it as a compile-time dependency to not cause any class conflicts. Or to make it independent add it as runtime dependency.
You can find the latest release (as .jar) here — Github releases.
Documentation about the framework is also available at my website.
Do not apply any kind of progaurd or class optimization to Itoo X framework.
Disclaimer
Itoo X framework is well tested with the latest App Inventor system and any new "type" of blocks introduced in future may not be instantly supported by the background environment.
Alternative way of using Itoo X in your extension projects
This is helpful when you use include the Itoo extension in your project, but do not want to include Itoo X as a separate library additionally.
This is the most simplest way of using Itoo...
Steps to follow:
Include Itoo X wrapper library (~3 KB) that will automatically manage calling Itoo and takes care of situations when Itoo is not present (i.e ClassNotFound Exception).
When you use this library, it is advised to apply progaurd to the library.
Calling Itoo in your background service / alarm broadcast / different process:
if (FrameworkWrapper.isItooXPresent()) {
// this checks if Itoo is present
String myScreen = "Screen1"; // the screen in which procedure exists
FrameworkWrapper wrapper = new FrameworkWrapper(context, myScreen);
if (wrapper.success()) {
wrapper.call("someProcedureName", arg1, arg2, arg3...);
}
}
The website does not exist. Is there any universal way to add Itoo X Framework, without knowing if the user who uses my extension will also add the itoo extension or not.
Use Itoo X Framework wrapper if running in background is optional functionality of your extension. In that case, follow the example of Notification Listener. (Itoo extension is to be present)
If that's not the case, and you want to run in background no matter what, then include the whole Itoo X Framework dependency.
Make sure to repackage your extension using proguard to avoid namespace collision when used with the actual extension.
Alternatively, to include the whole Itoo X dependency, you can clone the repository, change the package name in the src/ folder, and produce a new .jar file using IntelliJ Build System (Build Artifacts)