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
Developer
hak
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified
Accepted Solution

Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

I am getting the error "Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called". Then simulator freezes and I can not do anything. Tried to debug but no luck!!.

 

My app has two alternate entry points implmented based on the article http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800738/800901/How_To_...

 

Please see code below

 

public class UserInterface extends UiApplication{ public static void main(String[] args){ if ((args != null) && (args.length > 0) && (0==StringUtilities.compareToIgnoreCase(args[0].toString(), "GUI"))){ UserInterface theApp = new UserInterface(); theApp.enterEventDispatcher(); } else { try { Wait(); SetTimer(); ManageResources mg = new ManageResources(); System.exit(0); } catch (Exception ex) { if (RuntimeConfig.DEBUG) { System.out.println("UserInterface, main: " + ex); } } } } public UserInterface() { // DialogDisplay dd = new DialogDisplay(); pushScreen(new UserInterfaceScreen(this)); }

 

New Developer
farside08
Posts: 1
Registered: ‎09-16-2008
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

I am seeing the same error message on Verizon Storm device on 5.0. Do you have solution for this?
New Developer
TassadarXP
Posts: 1
Registered: ‎10-08-2009
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

I also had this problem, the cause was that my computer is behind a proxy-firewall so the MDS services simulator can't connect to the internet, i added the following lines in the rimpublic.property file under the "Eclipse\plugins\net.rim.eide.componentpack4.7.0_4.7.0.46\components\MDS\config" directory.

 

application.handler.http.proxyEnabled = true
application.handler.http.proxyHost= proxyserver
application.handler.http.proxyPort= 8080

 

this lines should be placed under the [HTTP HANDLER] section.

 

Hope it helps.

 

 

Developer
Developer
hak
Posts: 137
Registered: ‎06-01-2009
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

It works thanks.
Developer
jonberry
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

Same error here on Bold with 5.0

 

What the heck?

New Developer
yuzyin
Posts: 1
Registered: ‎10-19-2009
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

his only works for simulator

I have 9700 with 5.0 OS. My app is working on all other devices with existing 4.2-4.7 devices. However, I get this error and my app exits on this device. I think this is OS 5.0 related.

 

Do you have any solution for the devices to run those apps

Developer
konic
Posts: 173
Registered: ‎06-11-2009
My Device: Not Specified

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

[ Edited ]

Well, I don't know about devices, but simulators with OS 4.7.0.76 and 4.7.1.140 also give this s...tuff.

I have simple app written as MIDlet (I thought this was a problem, but it works OK on 4.5 'though).

In startApp() I try Connector.open(..) and all stops right here :smileysad:

Obviously, on Storm device I just cannot start app.

Any idea(s) what to do?

 

New Contributor
droidbbdev
Posts: 4
Registered: ‎09-22-2011
My Device: Storm 2

Re: Detected background switch for MyApp(24) who has NO tunnels open - defocus NOT called

i tried your suggetion but i get this error yet . and my app not working in Sumulator as well as device  . plz help my if you have any suggetion