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: 24
Registered: ‎01-12-2010
My Device: Storm2 9550
My Carrier: Telus

When executing application with simulator, application never starts, goes to phone start screen

[ Edited ]

Hello all In the process of testing out applications, I've come across a very annoying feature. When you select the application that you are working on to run, it will stat up the simulator, but then go to the main phone screen instead of the application that you are running. No errors, no crashes, no rhyme or reason to why it's occurring. Has anyone experienced this odd "feature", and if so, is there a way to fix it? Anything is better then no error at all.

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: When executing application with simulator, application never starts, goes to phone start screen

This is expected behavior. The simulator behaves the same way the device would behave on a reboot. You need to navigate to the application icon to start the GUI.

 

Of course, if your app is "auto-start" then the app is started during device startup. This is generally for apps which have a background component, or some startup housekeeping, like setting listeners.

 

What were you expecting?

 

Developer
Posts: 24
Registered: ‎01-12-2010
My Device: Storm2 9550
My Carrier: Telus

Re: When executing application with simulator, application never starts, goes to phone start screen

[ Edited ]

 


RexDoug wrote:

This is expected behavior. The simulator behaves the same way the device would behave on a reboot. You need to navigate to the application icon to start the GUI.

 

Of course, if your app is "auto-start" then the app is started during device startup. This is generally for apps which have a background component, or some startup housekeeping, like setting listeners.

 

What were you expecting?

 


 

Hmmm this is news to me. When my applications started before, there was a very good chance that they would auto-start. For example one that I'm working on is viewing the contents of the internal flash. This worked on start until just today, when it seems to have decided to no longer start up on simulator load with no code changes.

 

EDIT: Tried setting auto-run on startup in the blackberry_app_descriptor, with the same unpredictable results. Is there a way to command the simulator to always execute application when it is started?

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: When executing application with simulator, application never starts, goes to phone start screen

Apps will auto-start only when the auto-start property is set in the project properties.

 

Basically there are two reasons shy the app won't start if it is set to do so:

 

1. the app throuhs some type of general uncaught exception, like a null pointer

 

2. the app tries to start before the appropriate system resources are started. There is a system property, "in startup" that tells you it is unsafe (too early) to rely on system resources.

 

 

Developer
Posts: 24
Registered: ‎01-12-2010
My Device: Storm2 9550
My Carrier: Telus

Re: When executing application with simulator, application never starts, goes to phone start screen

Sorry for the late reply.(real life sucks). Just was able to try this again, with the same results. This is what is going on:

 

Autostart is set in blackberry_app_descriptor.xml

no uncaught exceptions are showing up, either on screen or in the console.

attempts to manually load the application in the simulator fail, as there is no application present. 

attempts to load the cod file while in the simulator fail (you can select the file, but it doesn't execute, nor show as an application on the device.

no errors appear in console, screen, in eclipse, nowhere.

already tried reinstalling eclipse, the beta plugin, even the OS. Still same result.

 

so ya I'm completely baffled here as to why this is not working, as I'm sure that this had to be tested before ti was released to the wild. Any help would be appriciated.

Contributor
Posts: 13
Registered: ‎02-20-2010
My Device: Bold 9700
My Carrier: Rogers

Re: When executing application with simulator, application never starts, goes to phone start screen

I'm wondering if the issue I'm having is kinda the opposite of what you're seeing.  I'm developing in eclipse as well.  I have 2 entry points.  One that is an auto-start for some background custom ApplicationMenuItem setup, and one that is the gui.  When I run the simulator from Eclipse to debug my application the GUI pops open right away.  I've switched the entry points around and I sorta see the opposite behaviour.

 

PrimaryEntryPoint->GUI, Alternate EntryPoint->AutoStart: The GUI comes up right away

PrimaryEntryPoint->Autostart, Alternate EntryPoint->GUI: I get TWO custom application menu items.

 

So something wants to run my Primary Entry at least once, and if its set to be an auto-start entry point, it will get run again.

 

This seems like the behaviour you're hoping for, and I'm trying to get rid of.  COuld this be an eclipse thing?

Contributor
Posts: 13
Registered: ‎02-20-2010
My Device: Bold 9700
My Carrier: Rogers

Re: When executing application with simulator, application never starts, goes to phone start screen

Oh man... can't believe it.  I literally went and checked one thing after writing that post and found my issue, and it may be your solution too.

 

I went to Eclipse -> Run -> Debug Configurations

 

Selected the configuration I'm testing with.  Selected the "Simulator" tab.  And the field "Launch App or URL" had the name of my app in it. I removed it from there any my problem went away.  Maybe you need to add your app name there.