I had a similar idea and started with an android app [1] for creating an app template with a simple interface directly on the device. It's not as powerful as this, but maybe I can implement basic support for these templates. But right now this would be only like a viewer and not something that can be used for own apps, not sure how useful that could be.
[1] https://play.google.com/store/apps/details?id=com.bashtian.a...