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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 272
Registered: ‎05-24-2010
My Device: DEV Alpha C & BB 9720
My Carrier: Idea and Airtel
Accepted Solution

get properties of the project ..

hi ..

 

I want to add some phone number to my project in properties  ..

 

i have to retrieve that phone no from the home screen  ..

 

is it possible to do that..

 

 

if we can .. can u please tell me how to add and how to retrieve

 

?

 

 

 

 

Developer
Posts: 272
Registered: ‎05-24-2010
My Device: DEV Alpha C & BB 9720
My Carrier: Idea and Airtel

Re: get properties of the project ..

 

Hi I have used the following code but it is giving my the null pointr exception where i am running it in the simulator..

 

I have edited the jad file..

 

 

CodeModuleGroup[] allGroups = CodeModuleGroupManager.loadAll();
    CodeModuleGroup myGroup = null;
        String moduleName = ApplicationDescriptor.currentApplicationDescriptor

().getModuleName();
           System.out.println("Reading moduleName" +moduleName);  // output is coming "blackberry_test"
            for (int i = 0; i < allGroups.length; i++) {
            if (allGroups[i].containsModule(moduleName)) {
                myGroup = allGroups[i];  // i am getting nothing here ..its  null
                break;
                }
            }

        String description = myGroup.getProperty("phoneNumber"); // it is giving null value..
    }

Highlighted
Developer
Posts: 147
Registered: ‎08-27-2010
My Device: 9800
My Carrier: airtel

Re: get properties of the project ..

It will work only if your application installed via OTA(through JAD file).

 

for testing: place jad and cod in you sdcard of simulator, in simulator browse to go the jad file and click on jad file to install your application.

Developer
Posts: 272
Registered: ‎05-24-2010
My Device: DEV Alpha C & BB 9720
My Carrier: Idea and Airtel

Re: get properties of the project ..

thank you very much..