BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 03-25-2009, 04:29 PM   #1
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Question Run Application in Background

Please Login to Remove!

Hello Everyone

I have an application with user interface and it implements PhoneListener. I want to run that application in the background and bring in front when user selects from the icon or from swtich tab.

How do I achive this?

Thanks
Offline  
Old 03-25-2009, 06:52 PM   #2
zechariahs
Thumbs Must Hurt
 
Join Date: Nov 2008
Location: Sioux Falls, SD
Model: 9530
PIN: N/A
Carrier: Verizon Wireless
Posts: 65
Default

So your class looks like the following?

Code:
public class MyClass extends UiApplication implements PhoneListener
That should be all you need to do what you're describing. Unless I'm missing something...
__________________
Handspring >> Palm >> BB Pearl >> BB Storm

Tumblog: http://www.geekkink.com
Blog: http://www.zechariahs.org/blog
Offline  
Old 03-25-2009, 07:03 PM   #3
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Default

Thanks for the input zechariahs.

I know how to implement PhoneListener. I want to run the application in the background and bring to front when user selects the icon or from swtich tab.

Thanks
Offline  
Old 03-25-2009, 07:17 PM   #4
zechariahs
Thumbs Must Hurt
 
Join Date: Nov 2008
Location: Sioux Falls, SD
Model: 9530
PIN: N/A
Carrier: Verizon Wireless
Posts: 65
Default

Try this How To - Setup an alternate entry point for my application.

Quote:
Alternate Entry Points can be used to launch the user interface (UI) component of the auto-started application when the user selects the icon from the ribbon.
__________________
Handspring >> Palm >> BB Pearl >> BB Storm

Tumblog: http://www.geekkink.com
Blog: http://www.zechariahs.org/blog
Offline  
Old 03-25-2009, 07:37 PM   #5
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Default

Thanks zechariahs.

I understand what is explained in the document. But, what do I need to do from application getting closed using "Close" menu.

Thanks
Offline  
Old 03-25-2009, 08:23 PM   #6
zechariahs
Thumbs Must Hurt
 
Join Date: Nov 2008
Location: Sioux Falls, SD
Model: 9530
PIN: N/A
Carrier: Verizon Wireless
Posts: 65
Default

From a user perspective, I would be pretty ticked if I couldn't close an application if I wanted to. Personally, I would override the onClose() method to prompt the user: "Are you sure you want to close? Yes | No | Cancel."

Also, if you really want to prevent the user from closing the application, override the onClose method to always return false.
__________________
Handspring >> Palm >> BB Pearl >> BB Storm

Tumblog: http://www.geekkink.com
Blog: http://www.zechariahs.org/blog
Offline  
Old 03-25-2009, 08:25 PM   #7
DD12
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 9530
PIN: N/A
Carrier: Telus
Posts: 107
Default

Thanks zechariahs.

Thats what I did.
Offline  
Old 03-25-2009, 10:25 PM   #8
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default

To put an application in the background call Application.requestBackground(), possibly as mentioned in the onClose() method.
Offline  
Old 06-15-2009, 04:35 AM   #9
pravipravi
Knows Where the Search Button Is
 
Join Date: Jul 2008
Location: India
Model: 9000
Carrier: AirTel
Posts: 29
Default

I too need the same idea, that i have an icon When i am pressing the icon, i need to invoke an sms application which is running background. When i am exiting and later on coming bak , i need to keep the same screen alive , from where i exit.
__________________
Praveen K
Offline  
Old 06-15-2009, 04:36 AM   #10
pravipravi
Knows Where the Search Button Is
 
Join Date: Jul 2008
Location: India
Model: 9000
Carrier: AirTel
Posts: 29
Default

if anyone knows pleas provide a sample code too..
Thanks
__________________
Praveen K
Offline  
Old 06-16-2009, 03:48 AM   #11
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Post

Hi pravi

You just need to override the onClose() method for doing that, as mentioned above.
__________________
Regards
Anand.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Genuine SAMSUNG Range Oven Relay Board DG92-01207D picture

Genuine SAMSUNG Range Oven Relay Board DG92-01207D

$99.95



Samsung MMAG41M Network Card EP96-02639C picture

Samsung MMAG41M Network Card EP96-02639C

$249.00



Samsung WiseNET SNV-7084RN 3Mp 3-8.5Mm Lens Network Dome Security Camera picture

Samsung WiseNET SNV-7084RN 3Mp 3-8.5Mm Lens Network Dome Security Camera

$199.00



New In Box SAMSUNG LTM170EU-L31 LCD Display Panel 17

New In Box SAMSUNG LTM170EU-L31 LCD Display Panel 17"

$188.88



NEW Samsung LTM190ET01 LCD Screen Display Panel 19-inch   picture

NEW Samsung LTM190ET01 LCD Screen Display Panel 19-inch

$173.91



Samsung, PT212ATP, Integrated Circuit, New, Lot of 13 picture

Samsung, PT212ATP, Integrated Circuit, New, Lot of 13

$195.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.