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: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getting control over pushing screen globally from background process

You may have missed the additional lines I added to my reply above. 

 

The process of adding and clearing a reference is a little tricky, because to clear it, you will have to give AlarmScreen() a callback to the code that creates it, but other than that, I would have thought the method I suggested should be clear. 

Developer
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: getting control over pushing screen globally from background process

[ Edited ]

can you provide me any link how to implement a callback. and thanks again for clearing the things Smiley Happy yeah i was early in reply. Can you just give me the snippet what you want to say. How to keep track of the refrences and all just a code snippet or any example would be much appreciated.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getting control over pushing screen globally from background process

"can you provide me any link how to implement a callback"

 

http://www.javaworld.com/javaworld/javatips/jw-javatip10.html

 

Can you use Google?  Smiley Wink

 

http://lmgtfy.com/?q=callback+sample+Java

Developer
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: getting control over pushing screen globally from background process

yeah of-course sorry to bother you but i didnt actually understood the method you described. I was editing my reply before that you have posted Smiley Wink Smiley Happy so please elaborate that.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: getting control over pushing screen globally from background process

While I could elaborate more, I am not sure I want to  I have two issues:

 

a) If I suggested something, it might not actually be the best solution to your problem overall, as I would just be showing you one way to process a call back

b) callback is one of those things that you just 'get' when you think about it.  Putting it in code means you have to interpret my code before you get to the idea.

 

So I think the best thing is for you to think about how logically you would solve this problem, what the Alarm Screen need to ask the alarm controller and what the alarm controller needs to tell the Alarm Screen, and work out how the two can actually communicate. 

 

So give it a go yourself.

 

Good luck.

Developer
Posts: 144
Registered: ‎03-15-2011
My Device: blackberry smart phone
My Carrier: Airtel

Re: getting control over pushing screen globally from background process

@peter_strange thanks for the suggestion. I have solved the issue but in different way. The way i have choosed is. I am storing all the id in the table and checking if there is any id in the table i am pushing only one screen. And before closing it i am checking if there is more id in the table just playing the song and updating the labels. Now its work just as the way i wanted . and if there is no more data i am just closing the screen. Smiley Happy