Welcome!

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

Reply
Developer
Posts: 37
Registered: ‎10-17-2008
My Device: Not Specified

Read Jad properties from emulator (OS 4.5)

I'm trying to read Jad properties from the emulator and it does not seem to work, whereas it works fine on an actual device.  I'm using Eclipse Plugin with the 4.5 version of the JDE.

 

This code snippet always returns null on the emulator

 

 

private CodeModuleGroup getCodeModuleGroup()
{
CodeModuleGroup[] allModuleGroups = CodeModuleGroupManager.loadAll();
CodeModuleGroup codeModuleGroup = null;
String moduleName = ApplicationDescriptor.currentApplicationDescriptor().getModuleName();

for (int i = 0; i < allModuleGroups.length; i++)
{
if (allModuleGroups[i].containsModule(moduleName))
{
codeModuleGroup = allModuleGroups[i];
break;
}
}
return codeModuleGroup;

}

 

Also I notice on the emulator it does not list the app under Options / Advanced / Applications.  I wonder if this is somehow related.

Any advice would be much appreciated!

 

BlackBerry Development Advisor
Posts: 15,303
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Read Jad properties from emulator (OS 4.5)

How was the application installed into the BlackBerry Simulator?  Did you install it from a web server using the BlackBerry Browser or was it automatically copied by Eclipse?  Were the custom properties added before or after build time?  If they were added after, you'd have to install the application using the BlackBerry Browser to see them.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 37
Registered: ‎10-17-2008
My Device: Not Specified

Re: Read Jad properties from emulator (OS 4.5)

 


MSohm wrote:
How was the application installed into the BlackBerry Simulator?  Did you install it from a web server using the BlackBerry Browser or was it automatically copied by Eclipse?  Were the custom properties added before or after build time?  If they were added after, you'd have to install the application using the BlackBerry Browser to see them.

 

I usually just let Eclipse automatically copy it. How do I add custom properties before build time?  Just manually edit the .jad that is on the file system?  I tried that and it did not work .. the app on the emulator did not see the change I made.

 

Here's what I did:

 

  • Open .jad file, add custom property
  • Do a clean build
  • Hit "Debug" in Eclipse to start emulator
  • Run App
  • From the App behavior, I can see it did not pick up the custom property
  • When I open the .jad, the custom property is still there, and the bb tools added some entries below it like RIM-COD-Creation-Time

 

 

Should I be changing the .jad directly or is there something in Eclipse where I can edit custom .jad properties?

Highlighted
BlackBerry Development Advisor
Posts: 15,303
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Read Jad properties from emulator (OS 4.5)

Adding custom JAD properties at build time appears to be failing in the BlackBerry JDE Plug-in for Eclipse.  I have reported this issue to our development team.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker