BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 05-31-2007, 05:41 PM   #1
ZaBlanc
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 7105T
Carrier: T-Mobile
Posts: 19
Default Keeping an App Running In The Background

Please Login to Remove!

Ihave a need to run an app in the background after it has been "closed." Is this possible with the BB API?
Offline  
Old 05-31-2007, 07:27 PM   #2
southwestcomm
BlackBerry Extraordinaire
 
Join Date: Jan 2005
Model: Many
Carrier: Sprint
Posts: 1,475
Default

Hitting the Alt and Escape key typically puts apps in the background.
Offline  
Old 05-31-2007, 11:33 PM   #3
ZaBlanc
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 7105T
Carrier: T-Mobile
Posts: 19
Default What about programmatically?

What about programmatically? I'd like to avoid telling a user how to do it and just set them in the mode when they hit cancel (a dialog would of course alert them first).

This is a GPS app that needs to keep tracking while allowing a user to continue to use their BB.
Offline  
Old 06-01-2007, 01:59 AM   #4
Skipper_Joe
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Default

just call Application.getApplication().requestBackground() instead of System.exit(0)
Offline  
Old 08-01-2007, 11:50 AM   #5
7100simpleisbetter
Talking BlackBerry Encyclopedia
 
7100simpleisbetter's Avatar
 
Join Date: Mar 2005
Model: 8120
PIN: Cushion
Carrier: TMobile
Posts: 355
Default

Quote:
Originally Posted by Skipper_Joe View Post
just call Application.getApplication().requestBackground() instead of System.exit(0)
I am using NetBeans to compile my project and I get the following error using this string:

C:\projectfolder\program.java:64: cannot find symbol
symbol : method requestBackground()
location: class Program
Application.getApplication().requestBackground();

Any help would be great
Offline  
Old 08-01-2007, 12:37 PM   #6
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

just do a alt-shift-f to fix the imports

i'm assuming you're using rims api and not writing a midlet?
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-01-2007, 05:15 PM   #7
7100simpleisbetter
Talking BlackBerry Encyclopedia
 
7100simpleisbetter's Avatar
 
Join Date: Mar 2005
Model: 8120
PIN: Cushion
Carrier: TMobile
Posts: 355
Default

Quote:
Originally Posted by jfisher View Post
just do a alt-shift-f to fix the imports

i'm assuming you're using rims api and not writing a midlet?
I am actually writing midlet. It works great but the only thing I can't figure out is when I hit the end button or try to put the application in the background it completely resets the application to the home screen. Any help would be appreciated.

Is there a way to convert a midlet to rims api so I don't have to rewrite the entire code and also take advantage of rims apis?

Last edited by 7100simpleisbetter; 08-01-2007 at 06:18 PM..
Offline  
Old 08-01-2007, 10:46 PM   #8
Skipper_Joe
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Default

There is no way to automaticall convert rim api to midlet api.

But you can try method MIDlet.notifyPaused(), it should pause application.
Offline  
Old 08-02-2007, 04:32 AM   #9
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

but the app won't continue to run in the background then?

i don't know how to move a standard midlet to the background and have it still run so can't help you there i'm afriad
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-19-2007, 05:37 PM   #10
Skipper_Joe
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Default

sorry for delay with answer - was an vacation.

As far as I understand, it depends on java VM implementation if app runs in paused state or not. There no specific behavior defined in MIDP spec.
I did small sample for BlackBerry - it shows, that BB runs midlet in background after notifyPaused() call and midlet can execute tasks in background - similar to UiApplication.
So this is ok for 7100simpleisbetter problem
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


Schneider Electric Energy Server EBX510 Server For Energy Management- picture

Schneider Electric Energy Server EBX510 Server For Energy Management-

$4350.00



FANUC Server Driver A06B-6077-H111 picture

FANUC Server Driver A06B-6077-H111

$2158.86



FANUC Server Driver A06B-6117-H211 picture

FANUC Server Driver A06B-6117-H211

$3993.99



NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0 picture

NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0

$179.99



Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM picture

Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM

$180.00



USA Windows VPS Server / RDP Server / VPS Hosting 12GB RAM 400GB HDD 12 Month picture

USA Windows VPS Server / RDP Server / VPS Hosting 12GB RAM 400GB HDD 12 Month

$335.00







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