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
walkline
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900
Accepted Solution

HomeScreen.setName was not perfect?

I'm using HomeScreen.setName to modify my app's title on the home screen, it was worked correctly, however, after reboot device the title on the home screen was reset to default, which wroten in BlackBerry_App_descriptor.xml.

 

I have been tried to using ApplicationDescriptor class to do something I need, but the descriptor doesn't have a function looks like setName.

 

Is there any way to solve my issue?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: HomeScreen.setName was not perfect?

call setName on startup.
see http://supportforums.blackberry.com/t5/Java-Development/Set-up-an-alternate-entry-point-for-an-appli...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
walkline
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900

Re: HomeScreen.setName was not perfect?

Thanks simon, I got it, but it's really so hard to implement in correct way....

Developer
walkline
Posts: 84
Registered: ‎01-10-2013
My Device: Bold 9900

Re: HomeScreen.setName was not perfect?

[ Edited ]

This my way to solve this issue.

 

First, check the "BlackBerry_App_Descriptor.xml", in the Application Tab, uncheck "Auto-run on startup" and "Do not display the application icon on the BlackBerry home screen"

 

Second, in the Alternate Entry Points Tab, setup AEP looks like below. Please pay attention to "Application argument" segment.

 

AEP.jpg

 

Third, insert codes into your main sub.

 

public static void main(String[] args)
    {
	String newAppName="anything you want to show";

    	if(args!=null && args.length>0 && args[0].equals("startup"))
    	{
   		HomeScreen.setName(newAppName, 0);
    	} else {
    		YourApp theApp = new YourApp();       
    	    	theApp.enterEventDispatcher();
    	}
}

 

After all everything will be OK:Clap: