I am trying to build my own Titanium module. For this I have created a UncloudedModule.java file:
@Kroll.module(name="Unclouded", id="vub.ac.be.unclouded")
public class UncloudedModule extends KrollModule {
// Standard Debugging variables
private static final String TAG = "UncloudedModule";
public UncloudedModule() {
super();
}
public UncloudedModule(TiContext context) {
super(context);
}
@Kroll.onAppCreate
public static void onAppCreate(TiApplication app) {
}
}
and an UncloudedProxy.java file:
@Kroll.proxy(creatableInModule = UncloudedModule.class)
public class UncloudedProxy extends KrollProxy {
private final Unclouded unclouded;
// Constructor
public UncloudedProxy() {
super();
unclouded = Unclouded.getInstance();
}
@Kroll.method
public Network goOnline() {
return unclouded.goOnline();
}
@Kroll.method
public void goOffline() {
unclouded.goOffline();
}
}
As can be read in the Android Module development guide, the creatableInModule annotation should automaticcaly add the > createUnclouded > method to the UncloudedModule. This however does not happen, since the .createUnclouded method is not found, while other method (defined in the UncloudedModule) can be used. My setup:
Some additional information:
- Application type: mobile
- Titanium SDK:3.1.3 (09/18/13 12:00 222f4d1)
- Platform & version: Android 4.2.2
- Host Operating System: OSX 10.8.4
- Titanium Studio: Titanium Command-Line Interface, CLI version 3.2.1, Titanium SDK version 3.2.1.GA