Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 229
Registered: ‎11-21-2009
My Device: Not Specified

No CodeModuleGroup - how does an App join a Code Module Group?

I've tried all kinds of stuff...




My app does not show up in a CodeModuleGroup, I've tried iterations...etc...




It's a 5.0 compile;




This snippet returns null:




       String myAppName = ApplicationDescriptor.currentApplicationDescriptor().getName();
       CodeModuleGroup group = CodeModuleGroupManager.load( myAppName );
       Dialog.inform("Group is "+group);




And this does not find anything either:



	    CodeModuleGroup[] allGroups = CodeModuleGroupManager.loadAll();
	    String moduleName = ApplicationDescriptor.currentApplicationDescriptor().getModuleName();    
	    int handle = ApplicationDescriptor.currentApplicationDescriptor().getModuleHandle();    
	    StringBuffer myBuf=new StringBuffer();
	    for (int i = 0; i < allGroups.length; i++) {
	    	String obj=null;
	    	for(Enumeration e = allGroups[i].getModules();e.hasMoreElements();obj=(String)e.nextElement())  {
	    		    if(obj==null) continue;
	    		    int module=CodeModuleManager.getModuleHandle(obj);
                    if(module==handle) myBuf.append("\n **"+obj);