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: 67
Registered: ‎07-25-2009
My Device: Z30
My Carrier: AT&T
Accepted Solution

Display Analog Clock Screen

I have looked for this - I've searched "Analog Clock" "Clock" "Analog" "Display Clock" - and nothing has shown so far.

 

Is there way to simply push the Clock Screen?  That's all I want is when someone go's to click my menu item it displays the clock screen.  It doesn't sound difficult but I have a feeling it probably isn't easy Smiley Tongue

 

Thank you!

 

Jeff

Developer
Posts: 67
Registered: ‎07-25-2009
My Device: Z30
My Carrier: AT&T

Re: Display Analog Clock Screen

I don't mean to be a bother, but it's been near 3 days - does anyone know?

 

Thank you,

 

Jeff

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Display Analog Clock Screen

There is no "clock screen" in the API - you will need to invent it.

 

Developer
Posts: 67
Registered: ‎07-25-2009
My Device: Z30
My Carrier: AT&T

Re: Display Analog Clock Screen

By clock, I mean just pushing the pre-made Blackberry Clock screen.  Open that module with a command through my application sort of thing..

Highlighted
Developer
Posts: 77
Registered: ‎01-27-2010
My Device: Bold 9000
My Carrier: AT&T

Re: Display Analog Clock Screen

Something like this should work:

 

		int handle = CodeModuleManager.getModuleHandle("net_rim_bb_clock");

		System.out.println("The handle is " + handle);
		ApplicationManager appMan = ApplicationManager.getApplicationManager();
		ApplicationDescriptor[] descriptors = CodeModuleManager.getApplicationDescriptors(handle);
		System.out.println("There are " + descriptors.length + " descriptors all up in here");
		for(int i = 0; i < descriptors.length; i++)
		{
			appMan.runApplication(descriptors[i]);
			System.out.println("This name is " + descriptors[i].getModuleName());
                 }

 

 

Developer
Posts: 67
Registered: ‎07-25-2009
My Device: Z30
My Carrier: AT&T

Re: Display Analog Clock Screen

Thank you that works perfectly!

Developer
Posts: 204
Registered: ‎07-09-2009
My Device: Not Specified

Re: Display Analog Clock Screen

[ Edited ]

For me it works perfectly in the simulator, with or without security enabled, but on the device (9530) it fails with a permissions exception even though everything is Allow and the firewall has been reset and disabled and the phone reset.  Tried both runApplication and launchApplication, no dice on the real device.

 

I did launchApplication("net_rim_bb_clock"), and runApplication() on the 1st descriptor.  Also tried using a utility that shows they're both actually "running" but in the background, the 2nd "app" in the bb_clock module is a system app, and the 1st refuses to come to the foreground when I try to switch to it.

 

Mark, is there some argument I have to pass it, to get it to cooperate?  I'd really prefer to bring up the built-in clock in this application rather than having to write a replacement.  Why does it work in the simulator but fail on-device?

 

Thank you

 

 

ah, I'm sorry to post again in a "solved" thread, but it's not "solved" if it doesn't work on a real phone.