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


6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF picture

6.3V 10V 16V 25V 35V 50V 100V 400V SMD Aluminum Electrolytic Capacitor 1-1000 UF

$155.59



CBB61 250V  Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF picture

CBB61 250V Capacitor 2 wires 1/2/3/3.5/4/5/6/7/8/9/10/12/15/18/20/24/25/30 UF

$129.95



45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk picture

45/5 MFD ±5% Dual Run Capacitor 370 450 VAC CBB65 AC Motor HVAC 45+5 uF Fan 10pk

$85.99



1/5pcs 100V~400V 0.1uF~100uF MKP Audio Metallized Polypropylene Film Capacitor picture

1/5pcs 100V~400V 0.1uF~100uF MKP Audio Metallized Polypropylene Film Capacitor

$63.90



CBB Capacitors 100V 250V 400V 630V 1600V Polyester Film Capacitor-Various Values picture

CBB Capacitors 100V 250V 400V 630V 1600V Polyester Film Capacitor-Various Values

$127.92



5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF picture

5pc Radial Electrolytic Capacitor 250V 100V 50V 25V 16V 0.22uF-4700uF 10000uF

$27.99







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