onstart

What's the best way to load highly re-used data in a .net web application

Let's say I have a list of categories for navigation on a web app. Rather than selecting from the database for evey user, should I add a function call in the application_onStart of the global.asax to fetch that data into an array or collection that is re-used over and over. If my data does not change at all - (Edit - very often), would...

Signalling Initialization Failure from Service.OnStart

We have a case where during Service startup (OnStart), a worker thread is started. The worker thread connects to a SQL database. If the database is unavailable, the worker thread can signal the main thread of the failure. The question is; How to signal the Service Control Manager that startup has failed. ...

Android: Using onStart() method in Bluetooth application

Hello, I am getting a nullpointer exception when my onStart() method is called. Here is the breakdown of my Android app: Opening the app brings a user to the homescreen: The user is then presented with the first 6 icons to choose from. When the user presses the "Sugar" icon it takes them to the SugarTabActivity. The SugarTabActivit...

How to display an image on start of a wpf app ?

Hi I have a wpf application in mvvm pattern. In main view, I have few links to other views. But before displaying the contents(that is ... the links) in main view, I need to display an image in main view ....that means...a welcome image will be displayed first to the user...say for 2 seconds...and then display the actual contents. Can a...

Android: Illegal View State Exception on Keyguard unlock

I have an activity, on which when I press the Keyguard lock button, the onDestroy() function is called. At then when I disable the keyguard lock, that activity is shown no more as I get a RuntimeException in Illegal View State. How can I prevent from onDestroy() to be called? Please help. ...